)]}'
{"keystone/identity/controllers.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"28eca5856d3a6ae3f3fe43543c0ec8fdcecb7822","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        for token_id in token_api.list_tokens(context, user_id):"},{"line_number":168,"context_line":"            token_api.delete_token(context, token_id)"},{"line_number":169,"context_line":"        #now delete trust tokens"},{"line_number":170,"context_line":"        for trust in (trust_api.list_trusts_for_trustee(context, user_id)):"},{"line_number":171,"context_line":"            token_list \u003d token_api.list_tokens(context, user_id,"},{"line_number":172,"context_line":"                                               trust_id\u003dtrust[\u0027id\u0027])"},{"line_number":173,"context_line":"            for token in token_list:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6Eg%3D","line":170,"updated":"2013-03-06 22:46:28.000000000","message":"(nit) remove ()","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"179555998f21c78643ae3d7d2d98f3fea50838a3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        for token_id in token_api.list_tokens(context, user_id):"},{"line_number":168,"context_line":"            token_api.delete_token(context, token_id)"},{"line_number":169,"context_line":"        #now delete trust tokens"},{"line_number":170,"context_line":"        for trust in (trust_api.list_trusts_for_trustee(context, user_id)):"},{"line_number":171,"context_line":"            token_list \u003d token_api.list_tokens(context, user_id,"},{"line_number":172,"context_line":"                                               trust_id\u003dtrust[\u0027id\u0027])"},{"line_number":173,"context_line":"            for token in token_list:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5qA%3D","line":170,"in_reply_to":"AAAAN3%2F%2F6Eg%3D","updated":"2013-03-07 17:20:08.000000000","message":"Done","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"28eca5856d3a6ae3f3fe43543c0ec8fdcecb7822","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # The users status has been changed but tokens remain valid for"},{"line_number":177,"context_line":"        # backends that can\u0027t list tokens for users"},{"line_number":178,"context_line":"        LOG.warning(_(\u0027User %s status has changed, but existing tokens \u0027"},{"line_number":179,"context_line":"                    \u0027remain valid\u0027 % user_id))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class User(controller.V2Controller):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6Ec%3D","line":179,"updated":"2013-03-06 22:46:28.000000000","message":"move \"% user_id\" out of _()","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"eed37442c0cdf3d08754ea93a47a5cc45fadae47","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # The users status has been changed but tokens remain valid for"},{"line_number":177,"context_line":"        # backends that can\u0027t list tokens for users"},{"line_number":178,"context_line":"        LOG.warning(_(\u0027User %s status has changed, but existing tokens \u0027"},{"line_number":179,"context_line":"                    \u0027remain valid\u0027 % user_id))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class User(controller.V2Controller):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F47g%3D","line":179,"in_reply_to":"AAAAN3%2F%2F6Ec%3D","updated":"2013-03-07 15:16:06.000000000","message":"+1; i18n is broken otherwise","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"179555998f21c78643ae3d7d2d98f3fea50838a3","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        # The users status has been changed but tokens remain valid for"},{"line_number":177,"context_line":"        # backends that can\u0027t list tokens for users"},{"line_number":178,"context_line":"        LOG.warning(_(\u0027User %s status has changed, but existing tokens \u0027"},{"line_number":179,"context_line":"                    \u0027remain valid\u0027 % user_id))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class User(controller.V2Controller):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5p8%3D","line":179,"in_reply_to":"AAAAN3%2F%2F6Ec%3D","updated":"2013-03-07 17:20:08.000000000","message":"Done","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e67673386f6b9ef4d6e6599d9d13db15745f5e35","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        if user.get(\u0027password\u0027) or not user.get(\u0027enabled\u0027, True):"},{"line_number":237,"context_line":"        # If the password was changed or the user was disabled we clear tokens"},{"line_number":238,"context_line":"            delete_tokens_for_user(context, self.token_api, self.trust_api,"},{"line_number":239,"context_line":"                                   user_id)"},{"line_number":240,"context_line":"        return {\u0027user\u0027: self._filter_domain_id(user_ref)}"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def delete_user(self, context, user_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F224%3D","line":239,"updated":"2013-03-08 18:06:01.000000000","message":"why do we delete trust token if user password changes?","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"7ec0bbb16675a738cd63b367c1341b73b904832e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        if user.get(\u0027password\u0027) or not user.get(\u0027enabled\u0027, True):"},{"line_number":237,"context_line":"        # If the password was changed or the user was disabled we clear tokens"},{"line_number":238,"context_line":"            delete_tokens_for_user(context, self.token_api, self.trust_api,"},{"line_number":239,"context_line":"                                   user_id)"},{"line_number":240,"context_line":"        return {\u0027user\u0027: self._filter_domain_id(user_ref)}"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def delete_user(self, context, user_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F21U%3D","line":239,"in_reply_to":"AAAAN3%2F%2F224%3D","updated":"2013-03-08 18:21:38.000000000","message":"So that is the password was compromised, we have removed all tokens generated from that compromise.","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e67673386f6b9ef4d6e6599d9d13db15745f5e35","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        # a user also adds them to a tenant, so we must follow up on that"},{"line_number":340,"context_line":"        self.identity_api.remove_role_from_user_and_project("},{"line_number":341,"context_line":"            context, user_id, tenant_id, role_id)"},{"line_number":342,"context_line":"        roles \u003d self.identity_api.get_roles_for_user_and_project("},{"line_number":343,"context_line":"            context, user_id, tenant_id)"},{"line_number":344,"context_line":"        delete_tokens_for_user("},{"line_number":345,"context_line":"            context, self.token_api, self.trust_api, user_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F23I%3D","line":342,"updated":"2013-03-08 18:06:01.000000000","message":"where are the \"roles\" being used?","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"7ec0bbb16675a738cd63b367c1341b73b904832e","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        # a user also adds them to a tenant, so we must follow up on that"},{"line_number":340,"context_line":"        self.identity_api.remove_role_from_user_and_project("},{"line_number":341,"context_line":"            context, user_id, tenant_id, role_id)"},{"line_number":342,"context_line":"        roles \u003d self.identity_api.get_roles_for_user_and_project("},{"line_number":343,"context_line":"            context, user_id, tenant_id)"},{"line_number":344,"context_line":"        delete_tokens_for_user("},{"line_number":345,"context_line":"            context, self.token_api, self.trust_api, user_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F21Q%3D","line":342,"in_reply_to":"AAAAN3%2F%2F23I%3D","updated":"2013-03-08 18:21:38.000000000","message":"It is not.  Removed in a follow on patch.","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"e67673386f6b9ef4d6e6599d9d13db15745f5e35","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        roles \u003d self.identity_api.get_roles_for_user_and_project("},{"line_number":343,"context_line":"            context, user_id, tenant_id)"},{"line_number":344,"context_line":"        delete_tokens_for_user("},{"line_number":345,"context_line":"            context, self.token_api, self.trust_api, user_id)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    # COMPAT(diablo): CRUD extension"},{"line_number":348,"context_line":"    def get_role_refs(self, context, user_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F23A%3D","line":345,"updated":"2013-03-08 18:06:01.000000000","message":"we should only delete a trust token if the role to be removed is one of the delegated roles.","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"7ec0bbb16675a738cd63b367c1341b73b904832e","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        roles \u003d self.identity_api.get_roles_for_user_and_project("},{"line_number":343,"context_line":"            context, user_id, tenant_id)"},{"line_number":344,"context_line":"        delete_tokens_for_user("},{"line_number":345,"context_line":"            context, self.token_api, self.trust_api, user_id)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    # COMPAT(diablo): CRUD extension"},{"line_number":348,"context_line":"    def get_role_refs(self, context, user_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F21M%3D","line":345,"in_reply_to":"AAAAN3%2F%2F23A%3D","updated":"2013-03-08 18:21:38.000000000","message":"I think that rule will only make sense once we have the rule in place that only an unscoped token can get another token.","commit_id":"415b88c1c17e2133edd02e7eb794157369d671fe"}],"keystone/token/backends/kvs.py":[{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"befd958b1a320ed4a941e97aa36d123de6a29365","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                tokens.append(token.split(\u0027-\u0027, 1)[1])"},{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":"            user \u003d ref.get(\u0027user\u0027)"},{"line_number":77,"context_line":"            if not user:"},{"line_number":78,"context_line":"                continue"},{"line_number":79,"context_line":"            if user.get(\u0027id\u0027) !\u003d user_id:"},{"line_number":80,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6i8%3D","line":77,"updated":"2013-03-06 17:14:06.000000000","message":"These if statements which all do a continue is pretty distracting. Why not group them a bit?\n\nif (not user\n    or user.get(\u0027id\u0027) !\u003d user_id\n    or ref.get(.......\n    or ....):\n   continue","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"179555998f21c78643ae3d7d2d98f3fea50838a3","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                tokens.append(token.split(\u0027-\u0027, 1)[1])"},{"line_number":75,"context_line":"                continue"},{"line_number":76,"context_line":"            user \u003d ref.get(\u0027user\u0027)"},{"line_number":77,"context_line":"            if not user:"},{"line_number":78,"context_line":"                continue"},{"line_number":79,"context_line":"            if user.get(\u0027id\u0027) !\u003d user_id:"},{"line_number":80,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5pw%3D","line":77,"in_reply_to":"AAAAN3%2F%2F6i8%3D","updated":"2013-03-07 17:20:08.000000000","message":"So, I took this idea and ran with it.  The revised patch should be much more legible.  Unfortunately, I was not able to split this into two functions (list_tokens_for_user and list_tokens_for_trust) at the API level due to the way the memcached backend is keyed.","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1e3fb77c7ac5ed65294a282eb7ccfeff7903cb04","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        for token, ref in self.db.items():"},{"line_number":94,"context_line":"            if not token.startswith(\u0027token-\u0027) or self.is_expired(now, ref):"},{"line_number":95,"context_line":"                continue"},{"line_number":96,"context_line":"            else:"},{"line_number":97,"context_line":"                if (user_matches(user_id, ref) and"},{"line_number":98,"context_line":"                        tenant_matches(tenant_id, ref)):"},{"line_number":99,"context_line":"                        tokens.append(token.split(\u0027-\u0027, 1)[1])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F2wQ%3D","line":96,"updated":"2013-03-08 18:58:19.000000000","message":"suggest remove else to remove a level of nesting.","commit_id":"a2c3636bfdebc3af3738e87fc2295dc3845913d2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1e3fb77c7ac5ed65294a282eb7ccfeff7903cb04","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            else:"},{"line_number":97,"context_line":"                if (user_matches(user_id, ref) and"},{"line_number":98,"context_line":"                        tenant_matches(tenant_id, ref)):"},{"line_number":99,"context_line":"                        tokens.append(token.split(\u0027-\u0027, 1)[1])"},{"line_number":100,"context_line":"        return tokens"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F2wo%3D","line":99,"updated":"2013-03-08 18:58:19.000000000","message":"this is extra-indented and hard to follow.","commit_id":"a2c3636bfdebc3af3738e87fc2295dc3845913d2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1e3fb77c7ac5ed65294a282eb7ccfeff7903cb04","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if trust_id:"},{"line_number":104,"context_line":"            return self._list_tokens_for_trust(trust_id)"},{"line_number":105,"context_line":"        else:"},{"line_number":106,"context_line":"            return self._list_tokens_for_user(user_id, tenant_id)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def list_revoked_tokens(self):"},{"line_number":109,"context_line":"        tokens \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F2v8%3D","line":106,"updated":"2013-03-08 18:58:19.000000000","message":"use named argument for named parameter, \"tenant_id\" -\u003e \"tenant_id\u003dtenant_id\"","commit_id":"a2c3636bfdebc3af3738e87fc2295dc3845913d2"}],"keystone/token/backends/sql.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1e3fb77c7ac5ed65294a282eb7ccfeff7903cb04","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            token_ref_dict \u003d token_ref.to_dict()"},{"line_number":113,"context_line":"            if (user_matches(user_id, token_ref_dict) and"},{"line_number":114,"context_line":"                    tenant_matches(tenant_id, token_ref_dict)):"},{"line_number":115,"context_line":"                    tokens.append(token_ref[\u0027id\u0027])"},{"line_number":116,"context_line":"        return tokens"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def list_tokens(self, user_id, tenant_id\u003dNone, trust_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F2vQ%3D","line":115,"updated":"2013-03-08 18:58:19.000000000","message":"this is extra-indented and hard to follow.","commit_id":"a2c3636bfdebc3af3738e87fc2295dc3845913d2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1e3fb77c7ac5ed65294a282eb7ccfeff7903cb04","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        if trust_id:"},{"line_number":120,"context_line":"            return self._list_tokens_for_trust(trust_id)"},{"line_number":121,"context_line":"        else:"},{"line_number":122,"context_line":"            return self._list_tokens_for_user(user_id, tenant_id)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def list_revoked_tokens(self):"},{"line_number":125,"context_line":"        session \u003d self.get_session()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F2vc%3D","line":122,"updated":"2013-03-08 18:58:19.000000000","message":"used named argument for named parameter, \"tenant_id\" -\u003e \"tenant_id\u003dtenant_id\".","commit_id":"a2c3636bfdebc3af3738e87fc2295dc3845913d2"}],"tests/test_auth.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"28eca5856d3a6ae3f3fe43543c0ec8fdcecb7822","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            self.trust_controller.trust_api,"},{"line_number":656,"context_line":"            self.trustee[\u0027id\u0027])"},{"line_number":657,"context_line":"        tokens \u003d self.trust_controller.token_api.list_tokens("},{"line_number":658,"context_line":"            {}, self.trustee[\u0027id\u0027], trust_id\u003dself.new_trust[\u0027id\u0027])"},{"line_number":659,"context_line":"        self.assertEquals(len(tokens), 0)"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"    def test_token_from_trust_cant_get_another_token(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F6C4%3D","line":658,"updated":"2013-03-06 22:46:28.000000000","message":"suggest put this function called 3 times into its own function, so it\u0027s obvious is the same function called each time.","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"179555998f21c78643ae3d7d2d98f3fea50838a3","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            self.trust_controller.trust_api,"},{"line_number":656,"context_line":"            self.trustee[\u0027id\u0027])"},{"line_number":657,"context_line":"        tokens \u003d self.trust_controller.token_api.list_tokens("},{"line_number":658,"context_line":"            {}, self.trustee[\u0027id\u0027], trust_id\u003dself.new_trust[\u0027id\u0027])"},{"line_number":659,"context_line":"        self.assertEquals(len(tokens), 0)"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"    def test_token_from_trust_cant_get_another_token(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4oE%3D","line":658,"in_reply_to":"AAAAN3%2F%2F47c%3D","updated":"2013-03-07 17:20:08.000000000","message":"Done anyway.  I like how it looks.  Cleaned up this function in the revised patch.","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"eed37442c0cdf3d08754ea93a47a5cc45fadae47","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            self.trust_controller.trust_api,"},{"line_number":656,"context_line":"            self.trustee[\u0027id\u0027])"},{"line_number":657,"context_line":"        tokens \u003d self.trust_controller.token_api.list_tokens("},{"line_number":658,"context_line":"            {}, self.trustee[\u0027id\u0027], trust_id\u003dself.new_trust[\u0027id\u0027])"},{"line_number":659,"context_line":"        self.assertEquals(len(tokens), 0)"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"    def test_token_from_trust_cant_get_another_token(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F47c%3D","line":658,"in_reply_to":"AAAAN3%2F%2F6C4%3D","updated":"2013-03-07 15:16:06.000000000","message":"disagree, just because it\u0027s already a one-liner, and the subsequent assertion is not always the same","commit_id":"1f7d837dc7061d2161be4c5860bfce72e14e83a6"}]}
