)]}'
{"neutron/context.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b153a99aaf48accb8cbea91b05c6aa3940934808","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self._session \u003d None"},{"line_number":67,"context_line":"        self.roles \u003d roles or []"},{"line_number":68,"context_line":"        if not self.is_admin:"},{"line_number":69,"context_line":"            self.is_advsvc \u003d policy.check_is_advsvc(self)"},{"line_number":70,"context_line":"        else:"},{"line_number":71,"context_line":"            self.is_advsvc \u003d True"},{"line_number":72,"context_line":"        if self.is_admin is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_9c9f505f","line":69,"updated":"2015-04-30 05:52:40.000000000","message":"We have to pay per line! ;)\n\nself.is_advsvc \u003d self.is_admin or policy.check_is_advsvc(self)","commit_id":"c26fffa79e7ef4ce5984a7cb2b04dc3e68689e1d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a5db68818bf30ccecda2a9de50787799d086ac3","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self._session \u003d None"},{"line_number":67,"context_line":"        self.roles \u003d roles or []"},{"line_number":68,"context_line":"        if not self.is_admin:"},{"line_number":69,"context_line":"            self.is_advsvc \u003d policy.check_is_advsvc(self)"},{"line_number":70,"context_line":"        else:"},{"line_number":71,"context_line":"            self.is_advsvc \u003d True"},{"line_number":72,"context_line":"        if self.is_admin is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_696386b2","line":69,"in_reply_to":"3acd31a7_9c9f505f","updated":"2015-04-30 13:56:44.000000000","message":"come on... I need to improve my scores on \"number of committed lines\"","commit_id":"c26fffa79e7ef4ce5984a7cb2b04dc3e68689e1d"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"097d388b6fbdd30edbacb34df70f7cc5619328d2","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.is_advsvc \u003d True"},{"line_number":72,"context_line":"        if self.is_admin is None:"},{"line_number":73,"context_line":"            self.is_admin \u003d policy.check_is_admin(self)"},{"line_number":74,"context_line":"        elif self.is_admin and load_admin_roles:"},{"line_number":75,"context_line":"            # Ensure context is populated with admin roles"},{"line_number":76,"context_line":"            admin_roles \u003d policy.get_admin_roles()"},{"line_number":77,"context_line":"            if admin_roles:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a29c1b6a","line":74,"updated":"2015-04-30 11:49:17.000000000","message":"shouldn\u0027t this check better be here after we find out \"self.is_admin\" ?","commit_id":"c26fffa79e7ef4ce5984a7cb2b04dc3e68689e1d"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2a5db68818bf30ccecda2a9de50787799d086ac3","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.is_advsvc \u003d True"},{"line_number":72,"context_line":"        if self.is_admin is None:"},{"line_number":73,"context_line":"            self.is_admin \u003d policy.check_is_admin(self)"},{"line_number":74,"context_line":"        elif self.is_admin and load_admin_roles:"},{"line_number":75,"context_line":"            # Ensure context is populated with admin roles"},{"line_number":76,"context_line":"            admin_roles \u003d policy.get_admin_roles()"},{"line_number":77,"context_line":"            if admin_roles:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a973de4c","line":74,"in_reply_to":"3acd31a7_a29c1b6a","updated":"2015-04-30 13:56:44.000000000","message":"The check I am adding or the check where you commented?\n\nIn the first case - nope, because my goal is to ensure the check for is_advsvc is not performed in the case where one explicitly sets is_admin when building the context - as in get_admin_context; for this kind of context, policy checks should not even be performed, as they\u0027re built after the request reaches the plugin. If is_admin\u003dFalse then we\u0027ll go to the policy engine for check_is_admin. And in that case it could be that the user is an admin but does not have adv svc role. This would be weird, but not impossible.\n\nIn the second case, I\u0027m not sure why would we need to have a separate if block for loading admin_roles. You can submit a patch if you want, but that code is going away in a different patch, so maybe it\u0027s not the case.","commit_id":"c26fffa79e7ef4ce5984a7cb2b04dc3e68689e1d"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"94831498db804378bfd45926bb928274bd28b652","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.is_advsvc \u003d True"},{"line_number":72,"context_line":"        if self.is_admin is None:"},{"line_number":73,"context_line":"            self.is_admin \u003d policy.check_is_admin(self)"},{"line_number":74,"context_line":"        elif self.is_admin and load_admin_roles:"},{"line_number":75,"context_line":"            # Ensure context is populated with admin roles"},{"line_number":76,"context_line":"            admin_roles \u003d policy.get_admin_roles()"},{"line_number":77,"context_line":"            if admin_roles:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_cabf29cf","line":74,"in_reply_to":"3acd31a7_a973de4c","updated":"2015-04-30 14:29:12.000000000","message":"Its the first case, and thanks for the explanation, its clear now","commit_id":"c26fffa79e7ef4ce5984a7cb2b04dc3e68689e1d"}]}
