)]}'
{"keystone/common/controller.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8f0c99af4df2c26f8498e6b3859c8c74bbad6359","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            LOG.debug(_(\u0027RBAC: Proceeding without tenant\u0027))"},{"line_number":64,"context_line":"        # NOTE(vish): this is pretty inefficient"},{"line_number":65,"context_line":"        creds[\u0027roles\u0027] \u003d [self.identity_api.get_role(context, role)[\u0027name\u0027]"},{"line_number":66,"context_line":"                          for role in creds.get(\u0027roles\u0027, [])]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    return creds"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnQw%3D","line":66,"updated":"2013-02-25 20:19:03.000000000","message":"i assume this is the old code verbatim?","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"53183bba99aa700e851908d204679ecd04b1aee9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            LOG.debug(_(\u0027RBAC: Proceeding without tenant\u0027))"},{"line_number":64,"context_line":"        # NOTE(vish): this is pretty inefficient"},{"line_number":65,"context_line":"        creds[\u0027roles\u0027] \u003d [self.identity_api.get_role(context, role)[\u0027name\u0027]"},{"line_number":66,"context_line":"                          for role in creds.get(\u0027roles\u0027, [])]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    return creds"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnPM%3D","line":66,"in_reply_to":"AAAAM3%2F%2BnQw%3D","updated":"2013-02-25 20:32:35.000000000","message":"Yes. It was removed in a V3 specific patch.","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8f0c99af4df2c26f8498e6b3859c8c74bbad6359","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    return creds"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def flatten(d, parent_key\u003d\u0027\u0027):"},{"line_number":72,"context_line":"    items \u003d []"},{"line_number":73,"context_line":"    for k, v in d.items():"},{"line_number":74,"context_line":"        new_key \u003d parent_key + \u0027.\u0027 + k if parent_key else k"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnRI%3D","line":71,"updated":"2013-02-25 20:19:03.000000000","message":"This needs a docstring -- it\u0027s not super clear that d is a dict or what the expected behavior is.","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"53183bba99aa700e851908d204679ecd04b1aee9","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    return creds"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def flatten(d, parent_key\u003d\u0027\u0027):"},{"line_number":72,"context_line":"    items \u003d []"},{"line_number":73,"context_line":"    for k, v in d.items():"},{"line_number":74,"context_line":"        new_key \u003d parent_key + \u0027.\u0027 + k if parent_key else k"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnPE%3D","line":71,"in_reply_to":"AAAAM3%2F%2BnRI%3D","updated":"2013-02-25 20:32:35.000000000","message":"Done","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8f0c99af4df2c26f8498e6b3859c8c74bbad6359","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    \"\"\"Wraps API calls with role based access controls (RBAC).\"\"\""},{"line_number":84,"context_line":"    @functools.wraps(f)"},{"line_number":85,"context_line":"    def wrapper(self, context, **kwargs):"},{"line_number":86,"context_line":"        if \u0027is_admin\u0027 in context and not context[\u0027is_admin\u0027]:"},{"line_number":87,"context_line":"            action \u003d \u0027identity:%s\u0027 % f.__name__"},{"line_number":88,"context_line":"            creds \u003d _build_policy_check_credentials(self, action,"},{"line_number":89,"context_line":"                                                    context, kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnRQ%3D","line":86,"updated":"2013-02-25 20:19:03.000000000","message":"it took me awhile to wrap my head around this, as it sort of looks like you\u0027re testing a positive condition and then negating roughly the same condition. i *think* this is equivalent... if it is, i prefer it:\n\n  if context.get(\u0027is_admin\u0027, False):","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8f0c99af4df2c26f8498e6b3859c8c74bbad6359","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    return _filterprotected"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"@dependency.requires(\u0027identity_api\u0027, \u0027policy_api\u0027, \u0027token_api\u0027, \u0027catalog_api\u0027)"},{"line_number":151,"context_line":"class V2Controller(wsgi.Application):"},{"line_number":152,"context_line":"    \"\"\"Base controller class for Identity API v2.\"\"\""},{"line_number":153,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnQU%3D","line":150,"updated":"2013-02-25 20:19:03.000000000","message":"i don\u0027t see how catalog_api is consumed above -- i assume this isn\u0027t intentional?","commit_id":"6bc8708b80bf3f6c91e363bbb19684ccd19151f8"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"51740ddf17d684f97e57bd4c97a07498f84aaf37","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        #v2 Tokens"},{"line_number":54,"context_line":"        creds \u003d token_ref.get(\u0027metadata\u0027, {}).copy()"},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            creds[\u0027user_id\u0027] \u003d token_ref[\u0027user\u0027].get(\u0027id\u0027)"},{"line_number":57,"context_line":"        except AttributeError:"},{"line_number":58,"context_line":"            LOG.warning(_(\u0027RBAC: Invalid user\u0027))"},{"line_number":59,"context_line":"            raise exception.Unauthorized()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2Bmcs%3D","line":56,"updated":"2013-02-26 05:37:39.000000000","message":"are the trustee_user_id and trustor_user_id being set somewhere? I thought trust APIs are depending on them.","commit_id":"6f0f18f05190c722fffbd36d2c7203496c6416a3"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"002a2b1b78f04c3cd51152292be3d69461c92f7d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    \"\"\"Wraps API calls with role based access controls (RBAC).\"\"\""},{"line_number":90,"context_line":"    @functools.wraps(f)"},{"line_number":91,"context_line":"    def wrapper(self, context, **kwargs):"},{"line_number":92,"context_line":"        if \u0027is_admin\u0027 in context and context[\u0027is_admin\u0027]:"},{"line_number":93,"context_line":"            LOG.warning(_(\u0027RBAC: Bypassing authorization\u0027))"},{"line_number":94,"context_line":"        else:"},{"line_number":95,"context_line":"            action \u003d \u0027identity:%s\u0027 % f.__name__"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bl%2FA%3D","line":92,"updated":"2013-02-26 13:58:59.000000000","message":"this can now definitely be simplified as:\n\n  if context.get(\u0027is_admin\u0027):","commit_id":"d6e1c608a1ed26bfc11c9c0de8d2ec7418a55f9f"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"789f6cf1ccaa461fae5e082a41c76d466665bab5","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                # - Data from the main url (which will be in the kwargs"},{"line_number":122,"context_line":"                #   parameter) and would typically include the prime key"},{"line_number":123,"context_line":"                #   of a get/update/delete call"},{"line_number":124,"context_line":"                #"},{"line_number":125,"context_line":"                # First  any query filter parameters"},{"line_number":126,"context_line":"                target \u003d dict()"},{"line_number":127,"context_line":"                if len(filters) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bl8s%3D","line":124,"updated":"2013-02-26 14:29:01.000000000","message":"Thanks!","commit_id":"f3d2a462209a9f2dd3faa1c5ca271f304eaa16d5"}],"tests/test_v3_protection.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"eb8c87288c3f9d7f8bdb197492124d2132ac0264","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        body \u003d r.body"},{"line_number":156,"context_line":"        self.assertEquals(self.user1[\u0027id\u0027], body[\u0027user\u0027][\u0027id\u0027])"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_get_user_protected_match_id_v2(self):"},{"line_number":159,"context_line":"        \"\"\"GET /users/{id} \"\"\""},{"line_number":160,"context_line":"        # Make sure we get all the users back if no protection"},{"line_number":161,"context_line":"        # or filtering"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2Bmec%3D","line":158,"updated":"2013-02-26 04:58:57.000000000","message":"are test_get_user_protected_match_id and test_get_user_protected_match_id_v2 identical or my eyes betrayed me?","commit_id":"6f0f18f05190c722fffbd36d2c7203496c6416a3"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"12fdae0cfbe780f075590b87554f4b313813be03","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        body \u003d r.body"},{"line_number":156,"context_line":"        self.assertEquals(self.user1[\u0027id\u0027], body[\u0027user\u0027][\u0027id\u0027])"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_get_user_protected_match_id_v2(self):"},{"line_number":159,"context_line":"        \"\"\"GET /users/{id} \"\"\""},{"line_number":160,"context_line":"        # Make sure we get all the users back if no protection"},{"line_number":161,"context_line":"        # or filtering"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2Bmc8%3D","line":158,"in_reply_to":"AAAAM3%2F%2Bmec%3D","updated":"2013-02-26 06:10:00.000000000","message":"Had planned on doing v2 auth for this, but it seemed out of place in v3 protection.  Messed with it for a while, but it is a bridge to far tonight","commit_id":"6f0f18f05190c722fffbd36d2c7203496c6416a3"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"f71865c9e76399633b10c213ed2a9e09b946045b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def test_get_user_protected_match_id(self):"},{"line_number":147,"context_line":"        \"\"\"GET /users/{id} \"\"\""},{"line_number":148,"context_line":"        # Make sure we get all the users back if no protection"},{"line_number":149,"context_line":"        # or filtering"},{"line_number":150,"context_line":"        policy \u003d {\"identity:get_user\": [[\"user_id:%(user_id)s\"]]}"},{"line_number":151,"context_line":"        with open(self.tmpfilename, \"w\") as policyfile:"},{"line_number":152,"context_line":"            policyfile.write(json.dumps(policy))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Bl%2B8%3D","line":149,"updated":"2013-02-26 13:56:40.000000000","message":"I think this comment is a cut and paste from another test?","commit_id":"d6e1c608a1ed26bfc11c9c0de8d2ec7418a55f9f"}]}
