)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"02915648a4bcd6ca52034ef7586b431b0d94619b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lance Bragstad \u003clbragstad@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-09-15 18:46:39 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow users to clean up role assignments."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows users the ability to remove role assignments in the"},{"line_number":10,"context_line":"event the user has been removed from the backend."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa98f980_9d98361d","line":7,"updated":"2014-09-17 03:18:51.000000000","message":"remove the trailing period here","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"}],"keystone/assignment/controllers.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] \u003d\u003d \u0027DELETE\u0027:"},{"line_number":512,"context_line":"                    pass"},{"line_number":513,"context_line":"                else:"},{"line_number":514,"context_line":"                    raise exception.UserNotFound(user_id\u003duser_id)"},{"line_number":515,"context_line":"        else:"},{"line_number":516,"context_line":"            ref[\u0027group\u0027] \u003d self.identity_api.get_group(group_id)"},{"line_number":517,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_828c94d8","line":514,"updated":"2014-09-14 23:27:47.000000000","message":"change the test to \n\n if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] !\u003d \u0027DELETE\u0027:\n\nthen don\u0027t need the pass.\n\nAlso, this should just raise since get_user was supposedly raising the right exception before.\n\nSo, this should be\n\n if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] !\u003d \u0027DELETE\u0027:\n     raise","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] \u003d\u003d \u0027DELETE\u0027:"},{"line_number":512,"context_line":"                    pass"},{"line_number":513,"context_line":"                else:"},{"line_number":514,"context_line":"                    raise exception.UserNotFound(user_id\u003duser_id)"},{"line_number":515,"context_line":"        else:"},{"line_number":516,"context_line":"            ref[\u0027group\u0027] \u003d self.identity_api.get_group(group_id)"},{"line_number":517,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_103c60c7","line":514,"in_reply_to":"fa98f980_828c94d8","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"39ba2a9de87574b150206350851ab4e3c5f9d36e","unresolved":false,"context_lines":[{"line_number":508,"context_line":"                # NOTE(lbragstad): This will allow users to clean up role"},{"line_number":509,"context_line":"                # assignments from the backend in the event the user was"},{"line_number":510,"context_line":"                # removed prior to the role assignment being removed."},{"line_number":511,"context_line":"                if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] !\u003d \u0027DELETE\u0027:"},{"line_number":512,"context_line":"                    raise"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_e948ab30","line":511,"updated":"2014-09-16 20:09:22.000000000","message":"This will apply to every API that uses _check_grant_protection and not just delete role assignment. Rather than change the behavior for every resource, have _check_grant_protection accept a new parameter (for example, allow_no_user\u003dFalse), change the delete role assignment operation to set allow_no_user\u003dTrue, and use that flag here rather than finding the request method.","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"acaea1fc9fb0f06b73f27db11dcd710db4422a89","unresolved":false,"context_lines":[{"line_number":508,"context_line":"                # NOTE(lbragstad): This will allow users to clean up role"},{"line_number":509,"context_line":"                # assignments from the backend in the event the user was"},{"line_number":510,"context_line":"                # removed prior to the role assignment being removed."},{"line_number":511,"context_line":"                if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] !\u003d \u0027DELETE\u0027:"},{"line_number":512,"context_line":"                    raise"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_a48dcf2c","line":511,"in_reply_to":"fa98f980_e948ab30","updated":"2014-09-17 16:13:22.000000000","message":"Done, nice suggestion. Thanks Brant!","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"251f71cd633b7eace3b0852653549c5439cfc9eb","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                # assignments from the backend in the event the user was"},{"line_number":510,"context_line":"                # removed prior to the role assignment being removed."},{"line_number":511,"context_line":"                if context[\u0027environment\u0027][\u0027REQUEST_METHOD\u0027] !\u003d \u0027DELETE\u0027:"},{"line_number":512,"context_line":"                    raise"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        else:"},{"line_number":515,"context_line":"            ref[\u0027group\u0027] \u003d self.identity_api.get_group(group_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_795669cf","line":512,"updated":"2014-09-16 01:18:46.000000000","message":"So if the user is not found raise an exception UNLESS it is a delete operation.  Very cool!","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"10e216dd18c98991df76bc59f901bfdab2eefc14","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        if user_id:"},{"line_number":507,"context_line":"            # NOTE(lbragstad): This will allow users to clean up role"},{"line_number":508,"context_line":"            # assignments from the backend in the event the user was"},{"line_number":509,"context_line":"            # removed prior to the role assignment being removed."},{"line_number":510,"context_line":"            if allow_no_user:"},{"line_number":511,"context_line":"                try:"},{"line_number":512,"context_line":"                    ref[\u0027user\u0027] \u003d self.identity_api.get_user(user_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_c42e53fa","line":509,"updated":"2014-09-17 16:16:53.000000000","message":"this note comment belongs at line 562 now.","commit_id":"2f713d022fe802b727b3e6d9bc37380e04aff58c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c688e4b09afbeee44e760ff97a95c1b5ab814d7d","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        if user_id:"},{"line_number":507,"context_line":"            # NOTE(lbragstad): This will allow users to clean up role"},{"line_number":508,"context_line":"            # assignments from the backend in the event the user was"},{"line_number":509,"context_line":"            # removed prior to the role assignment being removed."},{"line_number":510,"context_line":"            if allow_no_user:"},{"line_number":511,"context_line":"                try:"},{"line_number":512,"context_line":"                    ref[\u0027user\u0027] \u003d self.identity_api.get_user(user_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_c4f1f36b","line":509,"in_reply_to":"fa98f980_c42e53fa","updated":"2014-09-17 16:22:08.000000000","message":"Done","commit_id":"2f713d022fe802b727b3e6d9bc37380e04aff58c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"10e216dd18c98991df76bc59f901bfdab2eefc14","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                except exception.UserNotFound:"},{"line_number":514,"context_line":"                    pass"},{"line_number":515,"context_line":"            else:"},{"line_number":516,"context_line":"                ref[\u0027user\u0027] \u003d self.identity_api.get_user(user_id)"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        else:"},{"line_number":519,"context_line":"            ref[\u0027group\u0027] \u003d self.identity_api.get_group(group_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_44c5033c","line":516,"updated":"2014-09-17 16:16:53.000000000","message":"there\u0027s unnecessary duplication here:\n\n try:\n    ref[\u0027user\u0027] \u003d self.identity_api.get_user(user_id)\n except exception.UserNotFound:\n     if not allow_no_user:\n         raise","commit_id":"2f713d022fe802b727b3e6d9bc37380e04aff58c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c688e4b09afbeee44e760ff97a95c1b5ab814d7d","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                except exception.UserNotFound:"},{"line_number":514,"context_line":"                    pass"},{"line_number":515,"context_line":"            else:"},{"line_number":516,"context_line":"                ref[\u0027user\u0027] \u003d self.identity_api.get_user(user_id)"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        else:"},{"line_number":519,"context_line":"            ref[\u0027group\u0027] \u003d self.identity_api.get_group(group_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_a4ecef93","line":516,"in_reply_to":"fa98f980_44c5033c","updated":"2014-09-17 16:22:08.000000000","message":"Done","commit_id":"2f713d022fe802b727b3e6d9bc37380e04aff58c"}],"keystone/tests/test_v3_identity.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"80bc51a9b91cc8adf680c0a3433129550adf1555","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.delete(\u0027/roles/%(role_id)s\u0027 % {"},{"line_number":943,"context_line":"            \u0027role_id\u0027: self.role_id})"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    # FIXME(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":946,"context_line":"    def test_delete_user_before_role_assignment_succeeds(self):"},{"line_number":947,"context_line":"        \"\"\"Call ``DELETE`` on the user before the role assignment.\"\"\""},{"line_number":948,"context_line":"        # Create a new user"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_255fc842","line":945,"updated":"2014-09-11 01:58:36.000000000","message":"TODO, especially since that module doesn\u0027t exist yet, and it\u0027s valid without the change","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"eae2e243c3951bd485d2886ac0179d223f4edd7c","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_ea5bd2f3","line":974,"updated":"2014-09-10 22:29:47.000000000","message":"This is what\u0027s calling the identity API:\n\nhttps://github.com/openstack/keystone/blob/12655bf17276ace37ea27e8b981a1a53d1572781/keystone/assignment/controllers.py#L505\n\n\nWhich is called from a callback wrapping the revoke_grant method: \n\nhttps://github.com/openstack/keystone/blob/12655bf17276ace37ea27e8b981a1a53d1572781/keystone/assignment/controllers.py#L550","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d8ee8798f353eeaca3beb319ed0fd9d1666185e2","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_01eff8b1","line":974,"in_reply_to":"fa98f980_848784b4","updated":"2014-09-11 21:38:49.000000000","message":"Done","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d9e278f5678798cd6b42920e55ae110c9facf2de","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_5f42c93e","line":974,"in_reply_to":"fa98f980_848784b4","updated":"2014-09-11 15:32:00.000000000","message":"I\u0027ll rebase on that and get another revision pushed up, thanks Brant.","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f9d5e29b40c2aa81480f8c5f34d22d8459173be4","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_848784b4","line":974,"in_reply_to":"fa98f980_a4c5685d","updated":"2014-09-11 15:26:16.000000000","message":"That problem is fixed in https://review.openstack.org/#/c/119629/6 Rebase on that and then self.identity_api.driver.delete_user(). Although this case really only applies to the LDAP backend so maybe this should be in test_backend_ldap.","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c712b7856ea4f7a688103436397a286e9ed683ef","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_a4c5685d","line":974,"in_reply_to":"fa98f980_d38a3863","updated":"2014-09-11 15:14:29.000000000","message":"It\u0027s going to be tough to leverage the identity api to delete the user but not delete the role assignment at the same time. The identity api cleans up the assignments for the user in the sql driver, after the identity driver has deleted the user \n\nhttps://github.com/openstack/keystone/blob/12655bf17276ace37ea27e8b981a1a53d1572781/keystone/identity/backends/sql.py#L246","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f68ebd03b2de8a91a3f8692ca0aa9d855509fbe0","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_d38a3863","line":974,"in_reply_to":"fa98f980_e50f8037","updated":"2014-09-11 13:43:38.000000000","message":"That\u0027s what I started working on after I found the decorator that calls into the identity backend. It does appear that identity API is cleaning up all assignments when removing the user, which isn\u0027t the case we want here I don\u0027t think. \n\nI was trying to think of ways that we could remove the user from the backend without removing the assignments. Not sure what the best way to do this would be. The _load_sample_data() method from test_v3.py calls directly into the identity_api but I\u0027m not sure that will help here. \n\nhttps://github.com/openstack/keystone/blob/8566b7001d5aaf3eb40315c065fd701e34658f4a/keystone/tests/test_v3.py#L193","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"80bc51a9b91cc8adf680c0a3433129550adf1555","unresolved":false,"context_lines":[{"line_number":971,"context_line":"        # Identity API, but causes issues if the user is deleted from the"},{"line_number":972,"context_line":"        # backend (say LDAP) and the operator is trying to clean up"},{"line_number":973,"context_line":"        # role-assignments. See bug-1321378 for details."},{"line_number":974,"context_line":"        self.delete(member_url, expected_status\u003d404)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":977,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_e50f8037","line":974,"in_reply_to":"fa98f980_ea5bd2f3","updated":"2014-09-11 01:58:36.000000000","message":"now that i\u0027m reading the test written out... if the assignment was cleaned up correctly after the user was deleted, i\u0027d still expect this to return 404 (because there\u0027s no assignment to delete)...\n\ndoes this test class have access to directly delete the user out of the identity backend (without using HTTP, which should succeed) before attempting to delete the assignment (via HTTP, which would then 204, because an assignment is being deleted)?","commit_id":"6cc99094270b81e61dd1396406576f91ffc6cbfb"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.delete(\u0027/roles/%(role_id)s\u0027 % {"},{"line_number":943,"context_line":"            \u0027role_id\u0027: self.role_id})"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":946,"context_line":"    def test_delete_user_before_removing_role_assignment_succeeds(self):"},{"line_number":947,"context_line":"        \"\"\"Call `DELETE` on the user before the role assignment.\"\"\""},{"line_number":948,"context_line":"        # Create a new user"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_e2b48083","line":945,"updated":"2014-09-14 23:27:47.000000000","message":"there is no test_v3_assignment.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.delete(\u0027/roles/%(role_id)s\u0027 % {"},{"line_number":943,"context_line":"            \u0027role_id\u0027: self.role_id})"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":946,"context_line":"    def test_delete_user_before_removing_role_assignment_succeeds(self):"},{"line_number":947,"context_line":"        \"\"\"Call `DELETE` on the user before the role assignment.\"\"\""},{"line_number":948,"context_line":"        # Create a new user"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_255be454","line":945,"in_reply_to":"fa98f980_e2b48083","updated":"2014-09-15 15:14:43.000000000","message":"Correct, this is something I was visiting with dolphm about but given how close we are to RC1 we decided to hold off on the refactor. \n\nhttps://bugs.launchpad.net/keystone/+bug/1367778\n\nAt some point, we will create a tests/test_v3_assignment.py module and move the related tests.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":946,"context_line":"    def test_delete_user_before_removing_role_assignment_succeeds(self):"},{"line_number":947,"context_line":"        \"\"\"Call `DELETE` on the user before the role assignment.\"\"\""},{"line_number":948,"context_line":"        # Create a new user"},{"line_number":949,"context_line":"        new_user_ref \u003d self.new_user_ref(domain_id\u003dself.domain_id)"},{"line_number":950,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_02b8a473","line":947,"updated":"2014-09-14 23:27:47.000000000","message":"this should have `` rather than ` to be consistent","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":946,"context_line":"    def test_delete_user_before_removing_role_assignment_succeeds(self):"},{"line_number":947,"context_line":"        \"\"\"Call `DELETE` on the user before the role assignment.\"\"\""},{"line_number":948,"context_line":"        # Create a new user"},{"line_number":949,"context_line":"        new_user_ref \u003d self.new_user_ref(domain_id\u003dself.domain_id)"},{"line_number":950,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_5049885e","line":947,"in_reply_to":"fa98f980_02b8a473","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"0ae4af4060fc6cd8acc8e13b685bf5ac9a1a7850","unresolved":false,"context_lines":[{"line_number":950,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"},{"line_number":951,"context_line":"                             expected_status\u003d201)"},{"line_number":952,"context_line":"        response_json \u003d jsonutils.loads(response.body)"},{"line_number":953,"context_line":"        user_id \u003d response_json[\u0027user\u0027][\u0027id\u0027]"},{"line_number":954,"context_line":"        # Assign the user a role on the project"},{"line_number":955,"context_line":"        collection_url \u003d ("},{"line_number":956,"context_line":"            \u0027/projects/%(project_id)s/users/%(user_id)s/roles\u0027 % {"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_bdf37d71","line":953,"updated":"2014-09-15 01:39:31.000000000","message":"Use \u0027self.identity_api.create_user\u0027 directly?","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":950,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"},{"line_number":951,"context_line":"                             expected_status\u003d201)"},{"line_number":952,"context_line":"        response_json \u003d jsonutils.loads(response.body)"},{"line_number":953,"context_line":"        user_id \u003d response_json[\u0027user\u0027][\u0027id\u0027]"},{"line_number":954,"context_line":"        # Assign the user a role on the project"},{"line_number":955,"context_line":"        collection_url \u003d ("},{"line_number":956,"context_line":"            \u0027/projects/%(project_id)s/users/%(user_id)s/roles\u0027 % {"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_bd21ac9f","line":953,"in_reply_to":"fa98f980_bdf37d71","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        self.identity_api.driver.delete_user(user_id)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        # Attempt revoking the role from the user"},{"line_number":971,"context_line":"        self.delete(member_url, expected_status\u003d204)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_82a3b441","line":971,"updated":"2014-09-14 23:27:47.000000000","message":"there should be another call to self.head(member_url, expected_status\u003d204) since that would show that something changed.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        self.identity_api.driver.delete_user(user_id)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        # Attempt revoking the role from the user"},{"line_number":971,"context_line":"        self.delete(member_url, expected_status\u003d204)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_9df14803","line":971,"in_reply_to":"fa98f980_82a3b441","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"},{"line_number":975,"context_line":"        \"\"\"Call `DELETE` on the user and check the role assignment.\"\"\""},{"line_number":976,"context_line":"        # Create a new user"},{"line_number":977,"context_line":"        new_user_ref \u003d self.new_user_ref(domain_id\u003dself.domain_id)"},{"line_number":978,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_42ad4c30","line":975,"updated":"2014-09-14 23:27:47.000000000","message":"this should have `` rather than ` to be consistent","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"},{"line_number":975,"context_line":"        \"\"\"Call `DELETE` on the user and check the role assignment.\"\"\""},{"line_number":976,"context_line":"        # Create a new user"},{"line_number":977,"context_line":"        new_user_ref \u003d self.new_user_ref(domain_id\u003dself.domain_id)"},{"line_number":978,"context_line":"        response \u003d self.post(\u0027/users\u0027, body\u003d{\u0027user\u0027: new_user_ref},"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_7044cc46","line":975,"in_reply_to":"fa98f980_42ad4c30","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"77cfad71b88e58eb132d91158727f69a0c68580c","unresolved":false,"context_lines":[{"line_number":990,"context_line":"        self.put(member_url, expected_status\u003d204)"},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"        # Check the user has the role assigned"},{"line_number":993,"context_line":"        self.head(member_url, expected_status\u003d204)"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"        # Delete the user"},{"line_number":996,"context_line":"        self.identity_api.driver.delete_user(user_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_a265181f","line":993,"updated":"2014-09-14 23:27:47.000000000","message":"there\u0027s a lot of copied code here that should be moved into a function.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":990,"context_line":"        self.put(member_url, expected_status\u003d204)"},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"        # Check the user has the role assigned"},{"line_number":993,"context_line":"        self.head(member_url, expected_status\u003d204)"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"        # Delete the user"},{"line_number":996,"context_line":"        self.identity_api.driver.delete_user(user_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_5d28c085","line":993,"in_reply_to":"fa98f980_a265181f","updated":"2014-09-15 15:14:43.000000000","message":"Done","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"0ae4af4060fc6cd8acc8e13b685bf5ac9a1a7850","unresolved":false,"context_lines":[{"line_number":997,"context_line":""},{"line_number":998,"context_line":"        # We should get a 404 when looking for the user in the Identity"},{"line_number":999,"context_line":"        # backend."},{"line_number":1000,"context_line":"        self.head(member_url, expected_status\u003d404)"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":1003,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_3d514d62","line":1000,"updated":"2014-09-15 01:39:31.000000000","message":"I think we can just have one test that calls both delete and head.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"726d5ebb99b6a19f250e71de71333fb8219c01f5","unresolved":false,"context_lines":[{"line_number":997,"context_line":""},{"line_number":998,"context_line":"        # We should get a 404 when looking for the user in the Identity"},{"line_number":999,"context_line":"        # backend."},{"line_number":1000,"context_line":"        self.head(member_url, expected_status\u003d404)"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def test_crud_user_project_role_grants(self):"},{"line_number":1003,"context_line":"        collection_url \u003d ("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_bd836c01","line":1000,"in_reply_to":"fa98f980_3d514d62","updated":"2014-09-15 15:14:43.000000000","message":"I\u0027ve pulled the common code into a separate function according to bknudson\u0027s comment above, in which case, I think it makes sense to keep the tests separate.","commit_id":"924fffa608b415dcbb3aa6a92895f154c4d366b7"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"251f71cd633b7eace3b0852653549c5439cfc9eb","unresolved":false,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"    def _create_new_user_and_assign_role_on_project(self):"},{"line_number":945,"context_line":"        \"\"\"Create a new user and assign user a role on a project.\"\"\""},{"line_number":946,"context_line":"        # Create a new user"},{"line_number":947,"context_line":"        new_user \u003d self.new_user_ref(domain_id\u003dself.domain_id)"},{"line_number":948,"context_line":"        user_ref \u003d self.identity_api.create_user(new_user)"},{"line_number":949,"context_line":"        # Assign the user a role on the project"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_f969798c","line":946,"updated":"2014-09-16 01:18:46.000000000","message":"Love all the comments!","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"bfa6b7b2591a058227c158e010ad0e8a0bf28455","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            \u0027role_id\u0027: self.role_id})"},{"line_number":957,"context_line":"        self.put(member_url, expected_status\u003d204)"},{"line_number":958,"context_line":"        # Check the user has the role assigned"},{"line_number":959,"context_line":"        self.head(member_url, expected_status\u003d204)"},{"line_number":960,"context_line":"        return member_url, user_ref"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_4967f7b7","line":959,"updated":"2014-09-16 20:11:34.000000000","message":"why wouldn\u0027t the user have the role assignment? don\u0027t we have a test already that shows if you do self.put a role assignment that the user has the role?","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"54d7c40856a5d93fe04065ac6409823a7729d494","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            \u0027role_id\u0027: self.role_id})"},{"line_number":957,"context_line":"        self.put(member_url, expected_status\u003d204)"},{"line_number":958,"context_line":"        # Check the user has the role assigned"},{"line_number":959,"context_line":"        self.head(member_url, expected_status\u003d204)"},{"line_number":960,"context_line":"        return member_url, user_ref"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_9872f6ae","line":959,"in_reply_to":"fa98f980_4967f7b7","updated":"2014-09-17 13:56:51.000000000","message":"I\u0027m sure we do, I\u0027d have to check. I was just being verbose in the test. I can remove if needed.","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"251f71cd633b7eace3b0852653549c5439cfc9eb","unresolved":false,"context_lines":[{"line_number":960,"context_line":"        return member_url, user_ref"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":963,"context_line":"    def test_delete_user_before_removing_role_assignment_succeeds(self):"},{"line_number":964,"context_line":"        \"\"\"Call ``DELETE`` on the user before the role assignment.\"\"\""},{"line_number":965,"context_line":"        member_url, user \u003d self._create_new_user_and_assign_role_on_project()"},{"line_number":966,"context_line":"        # Delete the user from identity backend"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_b9d291fd","line":963,"updated":"2014-09-16 01:18:46.000000000","message":"This is the test case I wanted to see. Very nice!","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"02915648a4bcd6ca52034ef7586b431b0d94619b","unresolved":false,"context_lines":[{"line_number":970,"context_line":"        # Make sure the role is gone"},{"line_number":971,"context_line":"        self.head(member_url, expected_status\u003d404)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"},{"line_number":975,"context_line":"        \"\"\"Call ``DELETE`` on the user and check the role assignment.\"\"\""},{"line_number":976,"context_line":"        member_url, user \u003d self._create_new_user_and_assign_role_on_project()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_5de08e96","line":973,"updated":"2014-09-17 03:18:51.000000000","message":"silly question, why not move these to assignment now?","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"54d7c40856a5d93fe04065ac6409823a7729d494","unresolved":false,"context_lines":[{"line_number":970,"context_line":"        # Make sure the role is gone"},{"line_number":971,"context_line":"        self.head(member_url, expected_status\u003d404)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    # TODO(lbragstad): Move this test to tests/test_v3_assignment.py"},{"line_number":974,"context_line":"    def test_delete_user_and_check_role_assignment_fails(self):"},{"line_number":975,"context_line":"        \"\"\"Call ``DELETE`` on the user and check the role assignment.\"\"\""},{"line_number":976,"context_line":"        member_url, user \u003d self._create_new_user_and_assign_role_on_project()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_18ad26eb","line":973,"in_reply_to":"fa98f980_5de08e96","updated":"2014-09-17 13:56:51.000000000","message":"I was talking to dolphm about doing that but we decided to wait until we cut RC1, since the refactor probably takes less precedence than other things for RC1.","commit_id":"42032700b90462e7434d9c6aefcb12a5dd923968"}]}
