<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote" style>Hello, Dolph.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Nov 20, 2013 at 8:42 PM, Dolph Mathews <span dir="ltr"><<a href="mailto:dolph.mathews@gmail.com" target="_blank">dolph.mathews@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><div class="im">On Wed, Nov 20, 2013 at 10:24 AM, Yuriy Taraday <span dir="ltr"><<a href="mailto:yorik.sar@gmail.com" target="_blank">yorik.sar@gmail.com</a>></span> wrote:</div>

<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<div class="gmail_extra"><br></div><div class="gmail_extra">context.is_admin should not be checked directly from code, only through policy rules. It should be set only if we need to elevate privileges from code. That should be the meaning of it.</div>


</div></blockquote><div><br></div></div><div>is_admin is a short sighted and not at all granular -- it needs to die, so avoid imitating it.</div></div></div></div></blockquote><div><br></div><div style> I suggest keeping it in case we need to elevate privileges from code. In this case we can't rely on roles so just one flag should work fine.</div>

<div style>As I said before, we should avoid setting or reading is_admin directly from code. It should be set only in context.elevated and read only by "admin_required" policy rule.</div><div style><br></div><div style>

Does this sound reasonable?</div></div><div><br></div>-- <br><br><div>Kind regards, Yuriy.</div>
</div></div>