)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"project admin"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I671eec8544f7361c895c19e6785d38993707854e"},{"line_number":22,"context_line":"Closes-Bug: #1750673"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9fdfeff1_185b652e","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":6},"updated":"2019-01-24 22:39:01.000000000","message":"I think we can safely close this bug when we get the above patches merged. For now, we should reference it with:\n\n  Partial-Bug: #1750673","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"project admin"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I671eec8544f7361c895c19e6785d38993707854e"},{"line_number":22,"context_line":"Closes-Bug: #1750673"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9fdfeff1_d8bab36c","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":6},"in_reply_to":"9fdfeff1_185b652e","updated":"2019-02-11 10:22:45.000000000","message":"Done","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"}],"keystone/api/role_assignments.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            group_id\u003dparams.get(\u0027group.id\u0027),"},{"line_number":110,"context_line":"            system\u003dparams.get(\u0027scope.system\u0027),"},{"line_number":111,"context_line":"            project_id\u003dparams.get(\u0027scope.project.id\u0027),"},{"line_number":112,"context_line":"            domain_id\u003dparams.get(\u0027scope.domain.id\u0027),"},{"line_number":113,"context_line":"            include_subtree\u003dinclude_subtree,"},{"line_number":114,"context_line":"            inherited\u003dself._inherited,"},{"line_number":115,"context_line":"            effective\u003dself._effective,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_1874c598","line":112,"updated":"2019-01-24 22:39:01.000000000","message":"This change seems unrelated?","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            group_id\u003dparams.get(\u0027group.id\u0027),"},{"line_number":110,"context_line":"            system\u003dparams.get(\u0027scope.system\u0027),"},{"line_number":111,"context_line":"            project_id\u003dparams.get(\u0027scope.project.id\u0027),"},{"line_number":112,"context_line":"            domain_id\u003dparams.get(\u0027scope.domain.id\u0027),"},{"line_number":113,"context_line":"            include_subtree\u003dinclude_subtree,"},{"line_number":114,"context_line":"            inherited\u003dself._inherited,"},{"line_number":115,"context_line":"            effective\u003dself._effective,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_38abbf1d","line":112,"in_reply_to":"9fdfeff1_1874c598","updated":"2019-02-11 10:22:45.000000000","message":"Done","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"}],"keystone/common/policies/role_assignment.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8892b1a406628d77d7aa7f94ec091f72abdfcc50","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":48,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments\u0027,"},{"line_number":49,"context_line":"        check_str\u003dSYSTEM_READER_OR_DOMAIN_READER,"},{"line_number":50,"context_line":"        scope_types\u003d[\u0027system\u0027, \u0027domain\u0027],"},{"line_number":51,"context_line":"        description\u003d\u0027List role assignments.\u0027,"},{"line_number":52,"context_line":"        operations\u003d[{\u0027path\u0027: \u0027/v3/role_assignments\u0027,"},{"line_number":53,"context_line":"                     \u0027method\u0027: \u0027GET\u0027},"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_78dc1d44","line":50,"range":{"start_line":50,"start_character":32,"end_line":50,"end_character":38},"updated":"2018-12-12 22:29:14.000000000","message":"It _might_ be easier implementing system-reader support before incorporating domain roles?","commit_id":"90dff8e71f6e6d78d61e609b130ac0d587380da9"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e69a9876df68da0028028b5b3197df7be77b8334","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":36,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments_for_tree\u0027,"},{"line_number":37,"context_line":"        check_str\u003dbase.RULE_ADMIN_REQUIRED,"},{"line_number":38,"context_line":"        # NOTE(lbragstad): This is purely a project-scoped operation. The"},{"line_number":39,"context_line":"        # project tree is calculated based on the project scope of the token"},{"line_number":40,"context_line":"        # used to make the request. System administrators would have to find a"},{"line_number":41,"context_line":"        # way to supply a project scope with a system-scoped token, which"},{"line_number":42,"context_line":"        # defeats the purpose. System administrators can list all role"},{"line_number":43,"context_line":"        # assignments anyway, so the usefulness of an API that returns a subset"},{"line_number":44,"context_line":"        # is negligible when they have access to the entire set."},{"line_number":45,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":46,"context_line":"        description\u003d(\u0027List all role assignments for a given tree of \u0027"},{"line_number":47,"context_line":"                     \u0027hierarchical projects.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfd5e7cf_28b93fcb","side":"PARENT","line":44,"range":{"start_line":38,"start_character":8,"end_line":44,"end_character":64},"updated":"2019-01-10 17:12:59.000000000","message":"Any reason to remove the note?","commit_id":"921da3831678be24a2946c57831b6755716a61b7"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"77db7c6b6f364e8238e3e351bcef2a0a5481c7f2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":36,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments_for_tree\u0027,"},{"line_number":37,"context_line":"        check_str\u003dbase.RULE_ADMIN_REQUIRED,"},{"line_number":38,"context_line":"        # NOTE(lbragstad): This is purely a project-scoped operation. The"},{"line_number":39,"context_line":"        # project tree is calculated based on the project scope of the token"},{"line_number":40,"context_line":"        # used to make the request. System administrators would have to find a"},{"line_number":41,"context_line":"        # way to supply a project scope with a system-scoped token, which"},{"line_number":42,"context_line":"        # defeats the purpose. System administrators can list all role"},{"line_number":43,"context_line":"        # assignments anyway, so the usefulness of an API that returns a subset"},{"line_number":44,"context_line":"        # is negligible when they have access to the entire set."},{"line_number":45,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":46,"context_line":"        description\u003d(\u0027List all role assignments for a given tree of \u0027"},{"line_number":47,"context_line":"                     \u0027hierarchical projects.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_ccd25235","side":"PARENT","line":44,"range":{"start_line":38,"start_character":8,"end_line":44,"end_character":64},"in_reply_to":"dfd5e7cf_28b93fcb","updated":"2019-01-11 17:46:18.000000000","message":"Have to remove this later while implementing project scope. Added back","commit_id":"921da3831678be24a2946c57831b6755716a61b7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e69a9876df68da0028028b5b3197df7be77b8334","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from keystone.common.policies import base"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SYSTEM_READER_FOR_ROLE_ASSIGNMENT \u003d ("},{"line_number":19,"context_line":"    \u0027role:reader\u0027"},{"line_number":20,"context_line":")"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"deprecated_list_role_assignments \u003d policy.DeprecatedRule("}],"source_content_type":"text/x-python","patch_set":8,"id":"dfd5e7cf_68f187cd","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":17},"updated":"2019-01-10 17:12:59.000000000","message":"This should include scope_types, too (unfortunately). If an operator doesn\u0027t set enforce_scope \u003d True, then anyone with the reader role (on a project, domain, or system) will be able to list role assignments, which would be a regression.\n\nFor example:\n\n  (role:reader and system_scope:all)\n\nWould make sure we implement system reader\n\n  (role:reader and domain_id:%(target.domain_id)s)\n\nWould implement domain reader if we make sure we populate the domain id in the target when we process the request. I had to take a similar approach when implementing support for that here [0][1]\n\n[0] https://review.openstack.org/#/c/623319/5/keystone/common/policies/user.py\n[1] https://review.openstack.org/#/c/623319/5/keystone/api/users.py@167","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"77db7c6b6f364e8238e3e351bcef2a0a5481c7f2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from keystone.common.policies import base"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SYSTEM_READER_FOR_ROLE_ASSIGNMENT \u003d ("},{"line_number":19,"context_line":"    \u0027role:reader\u0027"},{"line_number":20,"context_line":")"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"deprecated_list_role_assignments \u003d policy.DeprecatedRule("}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_ec32b6a7","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":17},"in_reply_to":"dfd5e7cf_68f187cd","updated":"2019-01-11 17:46:18.000000000","message":"Done for system Reader","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from keystone.common.policies import base"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"SYSTEM_READER_FOR_ROLE_ASSIGNMENT \u003d base.SYSTEM_READER"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"deprecated_list_role_assignments \u003d policy.DeprecatedRule("},{"line_number":21,"context_line":"    name\u003dbase.IDENTITY % \u0027list_role_assignments\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_d8939da2","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":33},"updated":"2019-01-24 22:39:01.000000000","message":"Is there a reason for the alias? Should we just use base.SYSTEM_READER instead?","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    check_str\u003dbase.RULE_ADMIN_REQUIRED"},{"line_number":23,"context_line":")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"DEPRECATED_REASON \u003d ("},{"line_number":26,"context_line":"    \u0027As of the Stein release, the role assignment API now understands how to \u0027"},{"line_number":27,"context_line":"    \u0027handle system-scoped tokens in addition to project-scoped tokens, making \u0027"},{"line_number":28,"context_line":"    \u0027the API more accessible to users without compromising security or \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_589fadb3","line":25,"range":{"start_line":25,"start_character":20,"end_line":25,"end_character":21},"updated":"2019-01-24 22:39:01.000000000","message":"Another way we can write this (and I\u0027m guilty of starting this convention), would be to use \"\"\", which will save on indentation space below. For example:\n\n  DEPRECATED_REASON \u003d \"\"\"\n  ....\n  \"\"\"","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    check_str\u003dbase.RULE_ADMIN_REQUIRED"},{"line_number":23,"context_line":")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"DEPRECATED_REASON \u003d ("},{"line_number":26,"context_line":"    \u0027As of the Stein release, the role assignment API now understands how to \u0027"},{"line_number":27,"context_line":"    \u0027handle system-scoped tokens in addition to project-scoped tokens, making \u0027"},{"line_number":28,"context_line":"    \u0027the API more accessible to users without compromising security or \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_58a6c355","line":25,"range":{"start_line":25,"start_character":20,"end_line":25,"end_character":21},"in_reply_to":"9fdfeff1_589fadb3","updated":"2019-02-11 10:22:45.000000000","message":"Done","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    check_str\u003dbase.RULE_ADMIN_REQUIRED"},{"line_number":21,"context_line":")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DEPRECATED_REASON \u003d ("},{"line_number":24,"context_line":"    \u0027As of the Stein release, the role assignment API now understands how to \u0027"},{"line_number":25,"context_line":"    \u0027handle system-scoped tokens in addition to project-scoped tokens, making \u0027"},{"line_number":26,"context_line":"    \u0027the API more accessible to users without compromising security or \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_2f07f31e","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"updated":"2019-02-11 16:21:02.000000000","message":"nit: We could save a little space on indentation here by doing:\n\n  DEPRECATED_REASON \u003d \"\"\"\n  As of the Stein release...\n  \"\"\"\n\nI started rewriting some of the messages I was working on to fit that format, althrough it\u0027s strictly a cosmetic change.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"ed5ab84e0b986aa2564c89b433e9c89d1a6a69c8","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":19,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments\u0027,"},{"line_number":20,"context_line":"        check_str\u003dbase.RULE_ADMIN_REQUIRED,"},{"line_number":21,"context_line":"        # FIXME(lbragstad): This API will behave differently depending on the"},{"line_number":22,"context_line":"        # token scope used to call the API. A system administrator should be"},{"line_number":23,"context_line":"        # able to list all role assignment across the entire deployment. A"},{"line_number":24,"context_line":"        # project or domain administrator should be able to list role"},{"line_number":25,"context_line":"        # assignments within the domain or project they administer. Once we"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_26309407","side":"PARENT","line":22,"range":{"start_line":21,"start_character":28,"end_line":22,"end_character":43},"updated":"2019-02-22 12:57:28.000000000","message":"Has this been addressed? Or are we giving up on using this with project scope?","commit_id":"ace45841943ed6b698b8a5aea35a80c119c3cae3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"86084063ff7dd9c6fc8dbbe4b5fb02afef138d3b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":19,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments\u0027,"},{"line_number":20,"context_line":"        check_str\u003dbase.RULE_ADMIN_REQUIRED,"},{"line_number":21,"context_line":"        # FIXME(lbragstad): This API will behave differently depending on the"},{"line_number":22,"context_line":"        # token scope used to call the API. A system administrator should be"},{"line_number":23,"context_line":"        # able to list all role assignment across the entire deployment. A"},{"line_number":24,"context_line":"        # project or domain administrator should be able to list role"},{"line_number":25,"context_line":"        # assignments within the domain or project they administer. Once we"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_745ff40e","side":"PARENT","line":22,"range":{"start_line":21,"start_character":28,"end_line":22,"end_character":43},"in_reply_to":"9fdfeff1_26309407","updated":"2019-02-25 22:07:39.000000000","message":"No - I think we should keep this around until we have all the scopes supported with this API.\n\nLike many of the other patches implementing support for system-scope and default roles, this is limited to targeting system reader.\n\nI can revert this when I squash the subsequent patch into this one.","commit_id":"ace45841943ed6b698b8a5aea35a80c119c3cae3"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b56fd20cd8fb1a5281f83b77abe04eb16f07870f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":19,"context_line":"        name\u003dbase.IDENTITY % \u0027list_role_assignments\u0027,"},{"line_number":20,"context_line":"        check_str\u003dbase.RULE_ADMIN_REQUIRED,"},{"line_number":21,"context_line":"        # FIXME(lbragstad): This API will behave differently depending on the"},{"line_number":22,"context_line":"        # token scope used to call the API. A system administrator should be"},{"line_number":23,"context_line":"        # able to list all role assignment across the entire deployment. A"},{"line_number":24,"context_line":"        # project or domain administrator should be able to list role"},{"line_number":25,"context_line":"        # assignments within the domain or project they administer. Once we"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_1d1d5261","side":"PARENT","line":22,"range":{"start_line":21,"start_character":28,"end_line":22,"end_character":43},"in_reply_to":"9fdfeff1_745ff40e","updated":"2019-02-26 21:57:37.000000000","message":"Done","commit_id":"ace45841943ed6b698b8a5aea35a80c119c3cae3"}],"keystone/tests/unit/protection/v3/test_assignment.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":71,"context_line":"        with self.test_client() as c:"},{"line_number":72,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall\u0027, headers\u003dself.headers)"},{"line_number":73,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":74,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 2)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_user_specific_list_role_assignments_on_system(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_2256852b","line":73,"range":{"start_line":73,"start_character":12,"end_line":73,"end_character":17},"updated":"2019-01-11 20:14:15.000000000","message":"nit: looks like these were left over from debugging?","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":71,"context_line":"        with self.test_client() as c:"},{"line_number":72,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall\u0027, headers\u003dself.headers)"},{"line_number":73,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":74,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 2)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_user_specific_list_role_assignments_on_system(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_b8d22fff","line":73,"range":{"start_line":73,"start_character":12,"end_line":73,"end_character":17},"in_reply_to":"bfdaf3ff_2256852b","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":89,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":90,"context_line":"        with self.test_client() as c:"},{"line_number":91,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?user.id\u003d%s\u0027,"},{"line_number":92,"context_line":"                      user,"},{"line_number":93,"context_line":"                      headers\u003dself.headers)"},{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_22044517","line":91,"range":{"start_line":91,"start_character":69,"end_line":91,"end_character":71},"updated":"2019-01-11 20:14:15.000000000","message":"I think this might be messing with the test in a weird way. We\u0027re not performing any string substitution here, so this is the actual path used in the request. Since \u0027%s\u0027 is probably being ignored, you\u0027re actually getting back all 4 role assignments. The assertion at line 95 will need to be changed if we do something like:\n\n  ?user.id\u003d%s\u0027 % user[\u0027id\u0027],","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":89,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":90,"context_line":"        with self.test_client() as c:"},{"line_number":91,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?user.id\u003d%s\u0027,"},{"line_number":92,"context_line":"                      user,"},{"line_number":93,"context_line":"                      headers\u003dself.headers)"},{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_d8cff353","line":91,"range":{"start_line":91,"start_character":69,"end_line":91,"end_character":71},"in_reply_to":"bfdaf3ff_22044517","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?user.id\u003d%s\u0027,"},{"line_number":92,"context_line":"                      user,"},{"line_number":93,"context_line":"                      headers\u003dself.headers)"},{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":95,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 4)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_user_can_list_role_assignments_with_filter(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_dd03da0c","line":94,"range":{"start_line":94,"start_character":12,"end_line":94,"end_character":17},"updated":"2019-01-11 20:14:15.000000000","message":"nit: same comment here as above","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?user.id\u003d%s\u0027,"},{"line_number":92,"context_line":"                      user,"},{"line_number":93,"context_line":"                      headers\u003dself.headers)"},{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":95,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 4)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_user_can_list_role_assignments_with_filter(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_78d8471d","line":94,"range":{"start_line":94,"start_character":12,"end_line":94,"end_character":17},"in_reply_to":"bfdaf3ff_dd03da0c","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":95,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 4)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_user_can_list_role_assignments_with_filter(self):"},{"line_number":98,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":99,"context_line":"                                              unit.new_role_ref())"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_bd27f6b6","line":97,"updated":"2019-01-11 20:14:15.000000000","message":"minor nit on the naming of this test\n\nWe could do something like\n\n  def test_user_can_filter_role_assignments_by_project(self):\n\nwhich is a little more descriptive in what we\u0027re filtering by.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            print(len(r.json[\u0027role_assignments\u0027]))"},{"line_number":95,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 4)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def test_user_can_list_role_assignments_with_filter(self):"},{"line_number":98,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":99,"context_line":"                                              unit.new_role_ref())"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_38087f90","line":97,"in_reply_to":"bfdaf3ff_bd27f6b6","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        )"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":110,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":111,"context_line":"        with self.test_client() as c:"},{"line_number":112,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":113,"context_line":"                      project,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_5d0fea2d","line":110,"updated":"2019-01-11 20:14:15.000000000","message":"I don\u0027t think we\u0027ll actually need to pass these are kwargs since the method signature of the called method doesn\u0027t have kwargs at all. We should be able to rely on position of each argument. As an added bonus, we don\u0027t have to use the term \"tenant\", which is isn\u0027t really used anymore (we try and use \"project\" instead).\n\n  PROVIDERS.assignment_api.add_role_to_user_and_project(\n      user[\u0027id\u0027], project[\u0027id\u0027], role[\u0027id\u0027]\n  )","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        )"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":110,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":111,"context_line":"        with self.test_client() as c:"},{"line_number":112,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":113,"context_line":"                      project,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_580d439f","line":110,"in_reply_to":"bfdaf3ff_5d0fea2d","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":116,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def test_user_can_list_role_assignments_with_multiple_filter(self):"},{"line_number":119,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":120,"context_line":"                                              unit.new_role_ref())"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_3d3b06d2","line":118,"updated":"2019-01-11 20:14:15.000000000","message":"Similar comment here as above.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":116,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def test_user_can_list_role_assignments_with_multiple_filter(self):"},{"line_number":119,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":120,"context_line":"                                              unit.new_role_ref())"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_f832f75d","line":118,"in_reply_to":"bfdaf3ff_3d3b06d2","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        project \u003d PROVIDERS.resource_api.create_project("},{"line_number":123,"context_line":"            uuid.uuid4().hex,"},{"line_number":124,"context_line":"            unit.new_project_ref(domain_id\u003dCONF.identity.default_domain_id))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        user \u003d PROVIDERS.identity_api.create_user("},{"line_number":127,"context_line":"            unit.new_user_ref(domain_id\u003dCONF.identity.default_domain_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_9d5b122d","line":124,"range":{"start_line":124,"start_character":75,"end_line":124,"end_character":76},"updated":"2019-01-11 20:14:15.000000000","message":"nit: We can put this on the next line like you\u0027ve done at line 128 for consistency.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        project \u003d PROVIDERS.resource_api.create_project("},{"line_number":123,"context_line":"            uuid.uuid4().hex,"},{"line_number":124,"context_line":"            unit.new_project_ref(domain_id\u003dCONF.identity.default_domain_id))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        user \u003d PROVIDERS.identity_api.create_user("},{"line_number":127,"context_line":"            unit.new_user_ref(domain_id\u003dCONF.identity.default_domain_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_b840efa6","line":124,"range":{"start_line":124,"start_character":75,"end_line":124,"end_character":76},"in_reply_to":"bfdaf3ff_9d5b122d","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        )"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":131,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":132,"context_line":"        with self.test_client() as c:"},{"line_number":133,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?\u0027"},{"line_number":134,"context_line":"                      \u0027project.id\u003d%s?user.id\u003d%s\u0027 % (project, user),"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_1d32c2f2","line":131,"updated":"2019-01-11 20:14:15.000000000","message":"Same comment here as above.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        )"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":131,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":132,"context_line":"        with self.test_client() as c:"},{"line_number":133,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?\u0027"},{"line_number":134,"context_line":"                      \u0027project.id\u003d%s?user.id\u003d%s\u0027 % (project, user),"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_d83db32b","line":131,"in_reply_to":"bfdaf3ff_1d32c2f2","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":132,"context_line":"        with self.test_client() as c:"},{"line_number":133,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?\u0027"},{"line_number":134,"context_line":"                      \u0027project.id\u003d%s?user.id\u003d%s\u0027 % (project, user),"},{"line_number":135,"context_line":"                      headers\u003dself.headers)"},{"line_number":136,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":137,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_7d566e09","line":134,"range":{"start_line":134,"start_character":52,"end_line":134,"end_character":59},"updated":"2019-01-11 20:14:15.000000000","message":"This might need to be:\n\n  \u0027project.id\u003d%s?user.id\u003d%s\u0027 % (project[\u0027id\u0027], user[\u0027id\u0027])\n\nI think `project` is actually a dictionary in this case, at least based on line 122. Same with user.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":132,"context_line":"        with self.test_client() as c:"},{"line_number":133,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?\u0027"},{"line_number":134,"context_line":"                      \u0027project.id\u003d%s?user.id\u003d%s\u0027 % (project, user),"},{"line_number":135,"context_line":"                      headers\u003dself.headers)"},{"line_number":136,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":137,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_9843abaf","line":134,"range":{"start_line":134,"start_character":52,"end_line":134,"end_character":59},"in_reply_to":"bfdaf3ff_7d566e09","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027],"},{"line_number":171,"context_line":"            domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":172,"context_line":"        with self.test_client() as c:"},{"line_number":173,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?domain.id\u003d%s\u0027,"},{"line_number":174,"context_line":"                      CONF.identity.default_domain_id,"},{"line_number":175,"context_line":"                      headers\u003dself.headers)"},{"line_number":176,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][1][\u0027scope\u0027][\u0027domain\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_9d74729b","line":173,"range":{"start_line":173,"start_character":44,"end_line":173,"end_character":74},"updated":"2019-01-11 20:14:15.000000000","message":"I think this is saying that we\u0027re asking for system role assignment and domain role assignment, which might be mutually exclusive sets?\n\nIf this tests is only asserting that a system reader can list roles within a domain, then we can update this to the following:\n\n  /v3/role_assignments?domain.id\u003d%s\u0027 % CONF.identity.default_domain_id","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027],"},{"line_number":171,"context_line":"            domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":172,"context_line":"        with self.test_client() as c:"},{"line_number":173,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?domain.id\u003d%s\u0027,"},{"line_number":174,"context_line":"                      CONF.identity.default_domain_id,"},{"line_number":175,"context_line":"                      headers\u003dself.headers)"},{"line_number":176,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][1][\u0027scope\u0027][\u0027domain\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_581b03cf","line":173,"range":{"start_line":173,"start_character":44,"end_line":173,"end_character":74},"in_reply_to":"bfdaf3ff_9d74729b","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][1][\u0027scope\u0027][\u0027domain\u0027]"},{"line_number":177,"context_line":"                            [\u0027id\u0027], CONF.identity.default_domain_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test_user_can_list_role_assignments_another_domain(self):"},{"line_number":180,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":181,"context_line":"                                              unit.new_role_ref())"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_bd9a96c2","line":179,"range":{"start_line":179,"start_character":8,"end_line":179,"end_character":58},"updated":"2019-01-11 20:14:15.000000000","message":"From a system reader perspective, we just want to make sure we can list role assignments in any domain, which I think we\u0027ve confidently tested in the above test.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][1][\u0027scope\u0027][\u0027domain\u0027]"},{"line_number":177,"context_line":"                            [\u0027id\u0027], CONF.identity.default_domain_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test_user_can_list_role_assignments_another_domain(self):"},{"line_number":180,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":181,"context_line":"                                              unit.new_role_ref())"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_f80bd779","line":179,"range":{"start_line":179,"start_character":8,"end_line":179,"end_character":58},"in_reply_to":"bfdaf3ff_bd9a96c2","updated":"2019-01-18 08:25:00.000000000","message":"Done.Removed the test","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":192,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject[\u0027id\u0027])"},{"line_number":193,"context_line":"        with self.test_client() as c:"},{"line_number":194,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":195,"context_line":"                      project,"},{"line_number":196,"context_line":"                      headers\u003dself.headers)"},{"line_number":197,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_fdb7be39","line":194,"range":{"start_line":194,"start_character":44,"end_line":194,"end_character":74},"updated":"2019-01-11 20:14:15.000000000","message":"Same comment here as above. Also, is this test trying to assert domain role or project roles? The test names leads me to believe we\u0027re trying to test domain roles, but the query parameters here are specific to project role assignments.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        )"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":217,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject1[\u0027id\u0027])"},{"line_number":218,"context_line":"        with self.test_client() as c:"},{"line_number":219,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":220,"context_line":"                      project2,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_dd88ba72","line":217,"updated":"2019-01-11 20:14:15.000000000","message":"Same comment here as above.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        )"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":217,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject1[\u0027id\u0027])"},{"line_number":218,"context_line":"        with self.test_client() as c:"},{"line_number":219,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":220,"context_line":"                      project2,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_b829cfe6","line":217,"in_reply_to":"bfdaf3ff_dd88ba72","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":217,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject1[\u0027id\u0027])"},{"line_number":218,"context_line":"        with self.test_client() as c:"},{"line_number":219,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":220,"context_line":"                      project2,"},{"line_number":221,"context_line":"                      headers\u003dself.headers)"},{"line_number":222,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_9d82324f","line":219,"range":{"start_line":219,"start_character":44,"end_line":219,"end_character":74},"updated":"2019-01-11 20:14:15.000000000","message":"Same comment here as above.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":217,"context_line":"            role_id\u003drole[\u0027id\u0027], user_id\u003duser[\u0027id\u0027], tenant_id\u003dproject1[\u0027id\u0027])"},{"line_number":218,"context_line":"        with self.test_client() as c:"},{"line_number":219,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s\u0027 %"},{"line_number":220,"context_line":"                      project2,"},{"line_number":221,"context_line":"                      headers\u003dself.headers)"},{"line_number":222,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_d8261316","line":219,"range":{"start_line":219,"start_character":44,"end_line":219,"end_character":74},"in_reply_to":"bfdaf3ff_9d82324f","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":223,"context_line":"                            [\u0027id\u0027], project2[\u0027id\u0027])"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_user_in_another_group_can_list_role_assignments(self):"},{"line_number":226,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":227,"context_line":"                                              unit.new_role_ref())"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_1de3a235","line":225,"range":{"start_line":225,"start_character":8,"end_line":225,"end_character":61},"updated":"2019-01-11 20:14:15.000000000","message":"This is testing that a system reader can list group role assignments, right? If that\u0027s the case we could adjust the name to read like:\n\n  def test_user_can_list_group_role_assignments","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":223,"context_line":"                            [\u0027id\u0027], project2[\u0027id\u0027])"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_user_in_another_group_can_list_role_assignments(self):"},{"line_number":226,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":227,"context_line":"                                              unit.new_role_ref())"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_387b9ff5","line":225,"range":{"start_line":225,"start_character":8,"end_line":225,"end_character":61},"in_reply_to":"bfdaf3ff_1de3a235","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            role_id\u003drole[\u0027id\u0027], group_id\u003dgroup2[\u0027id\u0027], project_id\u003dproject[\u0027id\u0027])"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        with self.test_client() as c:"},{"line_number":251,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?group.id\u003d%s?\u0027"},{"line_number":252,"context_line":"                      \u0027user.id\u003d%s\u0027 % (group1, user), headers\u003dself.headers)"},{"line_number":253,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":254,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_3dc5468f","line":252,"range":{"start_line":251,"start_character":44,"end_line":252,"end_character":34},"updated":"2019-01-11 20:14:15.000000000","message":"Based on how I\u0027m reading the test, should this be:\n\n  /v3/role_assignments?group.id\u003d%s\u0027 % group2[\u0027id\u0027]\n\n?","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            role_id\u003drole[\u0027id\u0027], group_id\u003dgroup2[\u0027id\u0027], project_id\u003dproject[\u0027id\u0027])"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        with self.test_client() as c:"},{"line_number":251,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?group.id\u003d%s?\u0027"},{"line_number":252,"context_line":"                      \u0027user.id\u003d%s\u0027 % (group1, user), headers\u003dself.headers)"},{"line_number":253,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":254,"context_line":"                            [\u0027id\u0027], project[\u0027id\u0027])"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_5880e3c0","line":252,"range":{"start_line":251,"start_character":44,"end_line":252,"end_character":34},"in_reply_to":"bfdaf3ff_3dc5468f","updated":"2019-01-18 08:25:00.000000000","message":"Done","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"adb6bb1843a85bb290d63d636fba019a22ef7053","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            role_id\u003drole[\u0027id\u0027], group_id\u003dgroup[\u0027id\u0027], project_id\u003dproject1[\u0027id\u0027])"},{"line_number":293,"context_line":"        with self.test_client() as c:"},{"line_number":294,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s?\u0027"},{"line_number":295,"context_line":"                      \u0027group.id\u003d%s\u0027 % (project2, group), headers\u003dself.headers)"},{"line_number":296,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":297,"context_line":"                            [\u0027id\u0027], project2[\u0027id\u0027])"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_bd3616b4","line":295,"range":{"start_line":295,"start_character":65,"end_line":295,"end_character":77},"updated":"2019-01-11 20:14:15.000000000","message":"Since we\u0027re passing self.headers in, I think we\u0027re actually calling this API with a system reader token. The test name makes this seam like we\u0027re testing that someone in a group can list role assignment, not the system user.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"dbb8d9c24f66e3f6ded340ecab77334d8bdfce37","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            role_id\u003drole[\u0027id\u0027], group_id\u003dgroup[\u0027id\u0027], project_id\u003dproject1[\u0027id\u0027])"},{"line_number":293,"context_line":"        with self.test_client() as c:"},{"line_number":294,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall?project.id\u003d%s?\u0027"},{"line_number":295,"context_line":"                      \u0027group.id\u003d%s\u0027 % (project2, group), headers\u003dself.headers)"},{"line_number":296,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"},{"line_number":297,"context_line":"                            [\u0027id\u0027], project2[\u0027id\u0027])"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfdaf3ff_5869c31e","line":295,"range":{"start_line":295,"start_character":65,"end_line":295,"end_character":77},"in_reply_to":"bfdaf3ff_bd3616b4","updated":"2019-01-18 08:25:00.000000000","message":"Done. This is tested in above test case. Thus Removed it.","commit_id":"f2bebd6853ab4e666a19d173e01893417df0dbe4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        system_reader \u003d unit.new_user_ref("},{"line_number":36,"context_line":"            domain_id\u003dCONF.identity.default_domain_id"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":"        self.system_reader_id \u003d PROVIDERS.identity_api.create_user("},{"line_number":39,"context_line":"            system_reader"},{"line_number":40,"context_line":"        )[\u0027id\u0027]"},{"line_number":41,"context_line":"        PROVIDERS.assignment_api.create_system_grant_for_user("}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_18f7e5f7","line":38,"range":{"start_line":38,"start_character":13,"end_line":38,"end_character":29},"updated":"2019-01-24 22:39:01.000000000","message":"I typically write this as:\n\n  self.user_id \u003d PROVIDERS.identity_api...\n\nThat way if we reuse the tests by refactoring them into another class and inheriting them across multiple classes, the attribute name of the tests doesn\u0027t leak details about the persona we\u0027re testing.\n\nOn the other hand, it doesn\u0027t look like this is being used anywhere but the setUp class, so we could remove it as a variable of the test class.","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        system_reader \u003d unit.new_user_ref("},{"line_number":36,"context_line":"            domain_id\u003dCONF.identity.default_domain_id"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":"        self.system_reader_id \u003d PROVIDERS.identity_api.create_user("},{"line_number":39,"context_line":"            system_reader"},{"line_number":40,"context_line":"        )[\u0027id\u0027]"},{"line_number":41,"context_line":"        PROVIDERS.assignment_api.create_system_grant_for_user("}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_1866fb2a","line":38,"range":{"start_line":38,"start_character":13,"end_line":38,"end_character":29},"in_reply_to":"9fdfeff1_18f7e5f7","updated":"2019-02-11 10:22:45.000000000","message":"Done. Have used self.user_id in some methods.","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        with self.test_client() as c:"},{"line_number":75,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall\u0027, headers\u003dself.headers)"},{"line_number":76,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 2)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_user_specific_list_role_assignments_on_system(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_58d6cd51","line":75,"updated":"2019-01-24 22:39:01.000000000","message":"Do we know if the assignment we\u0027re making on line 70 is actually getting returned as a result of this query string? I believe the request we\u0027re making is asking for the response to be filtered by only system role assignments. The assignment being made on line 70 is a project role assignment. I tested this locally and the following assertion passes for me:\n\nhttps://pasted.tech/pastes/0fdcbff77176bcabfa5c0b239092c5a77e850078.raw\n\nFor example - we might think about modifying the test to explicitly ask for assignments for that specific project and make sure the user can access that API with a system scoped token.\n\nhttps://pasted.tech/pastes/3e508dd6ea867cae5f7a8a9d202ea366d3b852a0.raw\n\nSimilar comments throughout the file.","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        with self.test_client() as c:"},{"line_number":75,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.system\u003dall\u0027, headers\u003dself.headers)"},{"line_number":76,"context_line":"            self.assertTrue(len(r.json[\u0027role_assignments\u0027]) \u003d\u003d 2)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_user_specific_list_role_assignments_on_system(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_b86c8f08","line":75,"in_reply_to":"9fdfeff1_58d6cd51","updated":"2019-02-11 10:22:45.000000000","message":"Done","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c5d8e3652e0c2614e77fff8e4bd03f7047fec9b1","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            user[\u0027id\u0027], project[\u0027id\u0027], role[\u0027id\u0027]"},{"line_number":137,"context_line":"        )"},{"line_number":138,"context_line":"        with self.test_client() as c:"},{"line_number":139,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?project.id\u003d%s?user.id\u003d%s\u0027"},{"line_number":140,"context_line":"                      % (project[\u0027id\u0027], user[\u0027id\u0027]),"},{"line_number":141,"context_line":"                      headers\u003dself.headers)"},{"line_number":142,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_58c00d51","line":139,"range":{"start_line":139,"start_character":44,"end_line":139,"end_character":54},"updated":"2019-01-24 22:39:01.000000000","message":"According to the API reference, this needs to be scope.project.id, which we might need to change elsewhere in this module, too.\n\nhttps://developer.openstack.org/api-ref/identity/v3/index.html#roles","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"3d10f3ff440ed9ffb48fe2f14c0e31d0b70adbb1","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            user[\u0027id\u0027], project[\u0027id\u0027], role[\u0027id\u0027]"},{"line_number":137,"context_line":"        )"},{"line_number":138,"context_line":"        with self.test_client() as c:"},{"line_number":139,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?project.id\u003d%s?user.id\u003d%s\u0027"},{"line_number":140,"context_line":"                      % (project[\u0027id\u0027], user[\u0027id\u0027]),"},{"line_number":141,"context_line":"                      headers\u003dself.headers)"},{"line_number":142,"context_line":"            self.assertTrue(r.json[\u0027role_assignments\u0027][0][\u0027scope\u0027][\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"9fdfeff1_d86f13fa","line":139,"range":{"start_line":139,"start_character":44,"end_line":139,"end_character":54},"in_reply_to":"9fdfeff1_58c00d51","updated":"2019-02-11 10:22:45.000000000","message":"Done","commit_id":"4dda1224875021ec89bace98d00759e28fb9f57c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            self.token_id \u003d r.headers[\u0027X-Subject-Token\u0027]"},{"line_number":55,"context_line":"            self.headers \u003d {\u0027X-Auth-Token\u0027: self.token_id}"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_user_can_list_all_role_assignments_on_system(self):"},{"line_number":58,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":59,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":60,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_6acba952","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":57},"updated":"2019-02-11 16:21:02.000000000","message":"nit: We could include the term \"filtering\" here since we\u0027re really testing that system readers can filter assignments by system.\n\nWe could also bolster the assertion of this test by making sure every assignment is actually a system assignment.\n\nhttps://pasted.tech/pastes/697d1a5020234e36a752fc627c632af1da0e29de.raw","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                self.assertNotEqual(user, assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_user_can_list_role_assignments_by_project(self):"},{"line_number":82,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":83,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        project \u003d PROVIDERS.resource_api.create_project("},{"line_number":87,"context_line":"            uuid.uuid4().hex,"},{"line_number":88,"context_line":"            unit.new_project_ref(domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":89,"context_line":"        )"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        user \u003d PROVIDERS.identity_api.create_user("},{"line_number":92,"context_line":"            unit.new_user_ref(domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":93,"context_line":"        )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        PROVIDERS.assignment_api.add_role_to_user_and_project("},{"line_number":96,"context_line":"            user[\u0027id\u0027], project[\u0027id\u0027], role[\u0027id\u0027]"},{"line_number":97,"context_line":"        )"},{"line_number":98,"context_line":"        with self.test_client() as c:"},{"line_number":99,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.project.id\u003d%s\u0027 %"},{"line_number":100,"context_line":"                      project[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_aaff5165","line":97,"range":{"start_line":82,"start_character":0,"end_line":97,"end_character":9},"updated":"2019-02-11 16:21:02.000000000","message":"We duplicate this in several areas, so we could pull it into its own reusable function.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            r \u003d c.get(\u0027/v3/role_assignments?scope.project.id\u003d%s?user.id\u003d%s\u0027"},{"line_number":126,"context_line":"                      % (project[\u0027id\u0027], self.user_id),"},{"line_number":127,"context_line":"                      headers\u003dself.headers)"},{"line_number":128,"context_line":"            for assignment in r.json[\u0027role_assignments\u0027]:"},{"line_number":129,"context_line":"                self.assertNotEqual(user[\u0027id\u0027], assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def test_user_can_list_role_assignments_with_include_names(self):"},{"line_number":132,"context_line":"        role \u003d PROVIDERS.role_api.create_role("}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_ea61d93a","line":129,"range":{"start_line":128,"start_character":12,"end_line":129,"end_character":73},"updated":"2019-02-11 16:21:02.000000000","message":"We could invert the assertion here to say we only want to check that every user is, in fact, the user we filtered by.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            for assignment in r.json[\u0027role_assignments\u0027]:"},{"line_number":129,"context_line":"                self.assertNotEqual(user[\u0027id\u0027], assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def test_user_can_list_role_assignments_with_include_names(self):"},{"line_number":132,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":133,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":134,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_aae99180","line":131,"range":{"start_line":131,"start_character":49,"end_line":131,"end_character":62},"updated":"2019-02-11 16:21:02.000000000","message":"I\u0027m not aware of include_names having any impact on the RBAC or authoritative behavior of the assignments API. We might consider removing this as a protection test since it\u0027s more of a functional thing.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            for assignment in r.json[\u0027role_assignments\u0027]:"},{"line_number":171,"context_line":"                self.assertEqual(user[\u0027id\u0027], assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def test_user_can_list_role_assignments_another_domain(self):"},{"line_number":174,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":175,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":176,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_aa6c3108","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":58},"updated":"2019-02-11 16:21:02.000000000","message":"Similar comment here as to the comment on line 198.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            for assignment in r.json[\u0027role_assignments\u0027]:"},{"line_number":196,"context_line":"                self.assertEqual(user[\u0027id\u0027], assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_user_can_list_role_assignments_another_project(self):"},{"line_number":199,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":200,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":201,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_cabad56c","line":198,"range":{"start_line":198,"start_character":8,"end_line":198,"end_character":59},"updated":"2019-02-11 16:21:02.000000000","message":"Since we\u0027re operating within system-scope, this test is duplicated from the test on line 82. If we can filter by project, then we should be able to filter by any project with a system-scoped token.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44f6e2a8d3a8555c1a65120b962f72da29f9c5f2","unresolved":false,"context_lines":[{"line_number":220,"context_line":"            for assignment in r.json[\u0027role_assignments\u0027]:"},{"line_number":221,"context_line":"                self.assertEqual(user[\u0027id\u0027], assignment[\u0027user\u0027][\u0027id\u0027])"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_user_can_list_group_role_assignments(self):"},{"line_number":224,"context_line":"        role \u003d PROVIDERS.role_api.create_role("},{"line_number":225,"context_line":"            uuid.uuid4().hex, unit.new_role_ref()"},{"line_number":226,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_4aa6e555","line":223,"updated":"2019-02-11 16:21:02.000000000","message":"We could add some tests to test group system assignments.","commit_id":"3c8fa1e03886d91a6a9efbf615b736b9180b23d1"}],"keystone/tests/unit/protection/v3/test_v3_assignment.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"8892b1a406628d77d7aa7f94ec091f72abdfcc50","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            self.assertTrue(len(r.json[\u0027users\u0027]) \u003d\u003d 1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"class DomainReaderTests(base_classes.TestCaseWithBootstrap,"},{"line_number":86,"context_line":"                        common_auth.AuthTestMixin):"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_b8a075a5","line":85,"range":{"start_line":85,"start_character":6,"end_line":85,"end_character":23},"updated":"2018-12-12 22:29:14.000000000","message":"This could totally be personal preference, but I tried to break these out into separate patches, just because it helped me keep the contextual changes of each patch straight. Especially if things were getting complicated regarding tests.\n\nLet me know if you think that\u0027ll work better and I can hop in and try to give you a hand breaking it apart.","commit_id":"90dff8e71f6e6d78d61e609b130ac0d587380da9"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e69a9876df68da0028028b5b3197df7be77b8334","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfd5e7cf_085ebbe5","line":1,"updated":"2019-01-10 17:12:59.000000000","message":"nit: since v3 is already in the path, we probably don\u0027t need to include it in the file name itself.","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"77db7c6b6f364e8238e3e351bcef2a0a5481c7f2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_8cdc4a47","line":1,"in_reply_to":"dfd5e7cf_085ebbe5","updated":"2019-01-11 17:46:18.000000000","message":"Done","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e69a9876df68da0028028b5b3197df7be77b8334","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            r \u003d c.post(\u0027/v3/auth/tokens\u0027, json\u003dauth)"},{"line_number":54,"context_line":"            self.token_id \u003d r.headers[\u0027X-Subject-Token\u0027]"},{"line_number":55,"context_line":"            self.headers \u003d {\u0027X-Auth-Token\u0027: self.token_id}"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_user_can_list_role_assignments(self):"},{"line_number":58,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":59,"context_line":"                                              unit.new_role_ref())"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfd5e7cf_6803c7b9","line":56,"updated":"2019-01-10 17:12:59.000000000","message":"Testing here could get pretty intense because we could test that a system reader can list role assignments for users on projects, domains, and the system. We could do the same thing for groups.\n\nThat kind of testing would be more exhaustive and we\u0027d be able to modify those tests when we test this same API with domain and project users. Specifically, we need to make sure domain users aren\u0027t allowed to see role assignments outside of the domain they manage or system role assignments. Project users shouldn\u0027t be able to see any system assignments, domain assignments, or assignments for other projects.","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"77db7c6b6f364e8238e3e351bcef2a0a5481c7f2","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            r \u003d c.post(\u0027/v3/auth/tokens\u0027, json\u003dauth)"},{"line_number":54,"context_line":"            self.token_id \u003d r.headers[\u0027X-Subject-Token\u0027]"},{"line_number":55,"context_line":"            self.headers \u003d {\u0027X-Auth-Token\u0027: self.token_id}"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_user_can_list_role_assignments(self):"},{"line_number":58,"context_line":"        role \u003d PROVIDERS.role_api.create_role(uuid.uuid4().hex,"},{"line_number":59,"context_line":"                                              unit.new_role_ref())"}],"source_content_type":"text/x-python","patch_set":8,"id":"bfdaf3ff_0cf05ac9","line":56,"in_reply_to":"dfd5e7cf_6803c7b9","updated":"2019-01-11 17:46:18.000000000","message":"I added more possible test cases, checking for system scopes.","commit_id":"37961d9f012da833d089959cd393d45fc49b8904"}],"releasenotes/notes/bug-1750673-664a5c0792022b31.yaml":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"89e8479da2c6c97dba9372549e2cedc6b1b61e3a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"features:"},{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    [`bug 1750673 \u003chttps://bugs.launchpad.net/keystone/+bug/1750673\u003e`_]"},{"line_number":4,"context_line":"    The role assignments API now supports the ``admin``, ``member``, and"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"9fdfeff1_1da0f2f2","line":1,"updated":"2019-02-26 22:02:04.000000000","message":"We might want to hold off on adding this release note until we get the rest of the scope work applied. Once that is done, we can write a concise note for all the work instead of remembering to update this one through the series.","commit_id":"4ea23fea3d6b54823ffc7540dff107e1e833c16f"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9ae31e5a35e851a9ad4e566fbb10bb673526dbba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"features:"},{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    [`bug 1750673 \u003chttps://bugs.launchpad.net/keystone/+bug/1750673\u003e`_]"},{"line_number":4,"context_line":"    The role assignments API now supports the ``admin``, ``member``, and"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"9fdfeff1_6977dfd5","line":1,"in_reply_to":"9fdfeff1_1da0f2f2","updated":"2019-02-28 06:36:50.000000000","message":"Sure lance.","commit_id":"4ea23fea3d6b54823ffc7540dff107e1e833c16f"}]}
