<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.zreadusername
        {mso-style-name:zreadusername;}
span.zreadtitle
        {mso-style-name:zreadtitle;}
p.zhistorycontent, li.zhistorycontent, div.zhistorycontent
        {mso-style-name:zhistorycontent;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal00, li.msonormal00, div.msonormal00
        {mso-style-name:msonormal0;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.emailstyle19
        {mso-style-name:emailstyle19;}
span.emailstyle20
        {mso-style-name:emailstyle20;}
span.EmailStyle28
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle29
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle30
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:447628947;
        mso-list-type:hybrid;
        mso-list-template-ids:-1760951558 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#000000" vlink="#000000">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Yes the ‘is_admin_project’ represent the tenant.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I have tried to use many different users which are part of the admin, alt_demo, nova, vitrage, new_tenant that I have created and they all returned the is_admin_project=True.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">At the moment as I said only the admin user will be able to see the all-tenants, although this is not correct, and there are other users has the permissions to see all-tenants
 as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">We have added a new tab in horizon under the admin tab, where those who has permission to see that tab can see the vitrages all-tenants.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">In our case only the Admin at the moment will actually see all the entities.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Alexey<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> dong.wenjuan@zte.com.cn [mailto:dong.wenjuan@zte.com.cn]
<br>
<b>Sent:</b> Wednesday, May 17, 2017 12:24 PM<br>
<b>To:</b> Weyl, Alexey (Nokia - IL/Kfar Sava) <alexey.weyl@nokia.com><br>
<b>Cc:</b> openstack-dev@lists.openstack.org<br>
<b>Subject:</b> Re: [openstack-dev]Suspected SPAM - Re: [vitrage] about  "is_admin" in ctx<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p>Hi Alexey,<o:p></o:p></p>
<p>Currently we use 'is_admin' as 'is_admin_project'[1], right?<o:p></o:p></p>
<p>I think the 'is_admin_project' represent the tenant , not be related to user.<o:p></o:p></p>
<p>So why <span style="font-size:11.0pt;font-family:"Calibri",sans-serif">'is_admin_project</span>' alaways return 'True' with all of the user and tenants is the issue.<o:p></o:p></p>
<p>What about a user which is not <span style="font-family:"MS Gothic"">'</span>admin' but have the 'admin' role?<o:p></o:p></p>
<p>Should the user with 'admin' role see all  <span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
all-tenants?</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p>[1] <a href="https://github.com/openstack/vitrage/blob/master/vitrage/api_handler/apis/base.py#L94">
https://github.com/openstack/vitrage/blob/master/vitrage/api_handler/apis/base.py#L94</a><o:p></o:p></p>
<p><o:p> </o:p></p>
<p><span style="font-family:"MS Gothic"">Thanks</span>~<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>BR,<o:p></o:p></p>
<p>dwj<o:p></o:p></p>
<p><o:p> </o:p></p>
<p><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" align="center" style="text-align:center;line-height:21.0pt;background:#E0E5E9">
<span style="color:#1388FF">Original Mail<o:p></o:p></span></p>
<div id="zwriteHistoryContainer">
<div>
<div>
<div>
<p class="MsoNormal" style="background:#F5F6F8"><strong>Sender: </strong><span class="zreadusername">
</span><span class="zreadusername"><span style="font-family:"MS Gothic""><</span>alexey.weyl@nokia.com</span><span class="zreadusername"><span style="font-family:"MS Gothic"">></span>;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:#F5F6F8"><strong>To: </strong><span class="zreadusername">
</span><span class="zreadusername"><span style="font-family:"MS Gothic""><</span>openstack-dev@lists.openstack.org</span><span class="zreadusername"><span style="font-family:"MS Gothic"">></span>;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:#F5F6F8"><strong>Date: </strong>2017/05/15 22:49<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:#F5F6F8"><strong>Subject: Re: [openstack-dev]Suspected SPAM - Re:  [vitrage] about  "is_admin" in ctx</strong><o:p></o:p></p>
</div>
</div>
<p class="zhistorycontent"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Wenjuan,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Sorry it took me so long to answer due to the Boston Summit.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">After making some more checks in order to make it sure, the results are the following:</span><o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">The context that we use has 2 properties regarding admin (is_admin, is_admin_project).</span><o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">The is_admin property regards whether the user that has done the inquiry is the admin or not. So the only way it is True is if the user is  admin.</span><o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">The is_admin_project I thought will represent the tenant of the user, but from all of the user and tenants that I have used, it laways returned  me
 True.</span><o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Due to that I have decided to use the is_admin property in the context to indicate whether the user can see all-tenants or not.</span><o:p></o:p></p>
<p class="MsoListParagraph" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">5.<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">This is not a perfect solution because also users such as nova/cinder/all project names seems to be able to see the admin tab. In our case  what will
 happen is that although in the UI we have the admin tab for those users, the data we will show in the vitrage tab is not of all the tenants but this specific tenant.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Alexey</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><strong><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></strong><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Weyl, Alexey (Nokia
 - IL/Kfar Sava) [<a href="mailto:alexey.weyl@nokia.com">mailto:alexey.weyl@nokia.com</a>]
<br>
<strong><span style="font-family:"Calibri",sans-serif">Sent:</span></strong> Tuesday, April 25, 2017 3:10 PM<br>
<strong><span style="font-family:"Calibri",sans-serif">To:</span></strong> OpenStack Development Mailing List (not for usage questions)
</span><span style="font-size:11.0pt;font-family:"MS Gothic""><</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">openstack-dev@lists.openstack.org</span><span style="font-size:11.0pt;font-family:"MS Gothic"">></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><br>
<strong><span style="font-family:"Calibri",sans-serif">Subject:</span></strong> Suspected SPAM - Re: [openstack-dev] [vitrage] about  "is_admin" in ctx</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi Wenjuan,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">This is a good question, I need to check it a bit more thoroughly.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">It’s just that at the moment we are preparing for the Boston Openstack Summit and thus it will take me a bit more
 time to answer that.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Sorry for the delay.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Alexey
</span><span style="font-size:11.0pt;font-family:Wingdings">J</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><strong><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></strong><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:dong.wenjuan@zte.com.cn" target="_blank"><u><span style="color:blue">dong.wenjuan@zte.com.cn</span></u></a> [<a href="mailto:dong.wenjuan@zte.com.cn" target="_blank"><u><span style="color:blue">mailto:dong.wenjuan@zte.com.cn</span></u></a>]
<br>
<strong><span style="font-family:"Calibri",sans-serif">Sent:</span></strong> Friday, April 21, 2017 11:08 AM<br>
<strong><span style="font-family:"Calibri",sans-serif">To:</span></strong> <a href="mailto:openstack-dev@lists.openstack.org" target="_blank">
<u><span style="color:blue">openstack-dev@lists.openstack.org</span></u></a><br>
<strong><span style="font-family:"Calibri",sans-serif">Subject:</span></strong> [openstack-dev] [vitrage] about  "is_admin" in ctx</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p>Hi all,<o:p></o:p></p>
<p><span style="font-family:"Arial",sans-serif;color:black;background:white">I'm a little confused about the "is_amdin" in ctx.
</span><o:p></o:p></p>
<p><span style="font-family:"Arial",sans-serif;color:black;background:white">From the hook(</span><a href="https://github.com/openstack/vitrage/blob/master/vitrage/api/hooks.py#L73" target="_blank"><span style="font-family:"Arial",sans-serif;color:#0654AC;background:white">https://github.com/openstack/vitrage/blob/master/vitrage/api/hooks.py#L73</span></a><span style="font-family:"Arial",sans-serif;color:black;background:white">),
  "is_admin" means admin user,.</span><o:p></o:p></p>
<p><span style="font-family:"Arial",sans-serif;color:black;background:white">But we define the macro as "admin project"(
</span><a href="https://github.com/openstack/vitrage/blob/master/vitrage/api_handler/apis/base.py#L94" target="_blank"><u><span style="color:blue">https://github.com/openstack/vitrage/blob/master/vitrage/api_handler/apis/base.py#L94</span></u></a><span style="font-family:"Arial",sans-serif;color:black;background:white">
  ). But in my opinion,  it should be the admin role. Correct me if i'm wrong :).</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-family:"Arial",sans-serif;color:black;background:white">BR,</span><o:p></o:p></p>
<p><span style="font-family:"Arial",sans-serif;color:black;background:white">dwj</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p> <o:p></o:p></p>
<p> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p><o:p> </o:p></p>
</div>
</div>
</body>
</html>