)]}'
{"keystone/assignment/controllers.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1db964a3d757d0bbb4eccc3e568b26bac30144b9","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    def list_user_projects(self, request, filters, user_id):"},{"line_number":268,"context_line":"        hints \u003d ProjectAssignmentV3.build_driver_hints(request, filters)"},{"line_number":269,"context_line":"        refs \u003d self.assignment_api.list_projects_for_user(user_id,"},{"line_number":270,"context_line":"                                                          hints\u003dhints)"},{"line_number":271,"context_line":"        return ProjectAssignmentV3.wrap_collection(request.context_dict,"},{"line_number":272,"context_line":"                                                   refs,"},{"line_number":273,"context_line":"                                                   hints\u003dhints)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_5ec5c28d","side":"PARENT","line":270,"updated":"2017-08-08 20:28:22.000000000","message":"Still need to figure out how to handle this","commit_id":"bd3c5e50e0712071b48902a8b31729ab8a481ffb"}],"keystone/assignment/core.py":[{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"8d6d2517c5c0c8acdfa9f083519e695d46a7ad32","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    # TODO(henry-nash): We might want to consider list limiting this at some"},{"line_number":225,"context_line":"    # point in the future."},{"line_number":226,"context_line":"    @MEMOIZE_COMPUTED_ASSIGNMENTS"},{"line_number":227,"context_line":"    def list_projects_for_user(self, user_id):"},{"line_number":228,"context_line":"        # FIXME(lbragstad): Without the use of caching, listing effective role"},{"line_number":229,"context_line":"        # assignments is slow, especially with large data set (lots of users"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_0cb90f79","line":226,"range":{"start_line":226,"start_character":5,"end_line":226,"end_character":33},"updated":"2017-08-10 21:55:35.000000000","message":"I presume we will invalidate the cache if the user\u0027s project assignment changes?","commit_id":"63124f703a81074793360c1b91711b6ee5a76196"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4640499480d747f9d5a67a5ab0ba2ebf2f1d369b","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    # TODO(henry-nash): We might want to consider list limiting this at some"},{"line_number":225,"context_line":"    # point in the future."},{"line_number":226,"context_line":"    @MEMOIZE_COMPUTED_ASSIGNMENTS"},{"line_number":227,"context_line":"    def list_projects_for_user(self, user_id):"},{"line_number":228,"context_line":"        # FIXME(lbragstad): Without the use of caching, listing effective role"},{"line_number":229,"context_line":"        # assignments is slow, especially with large data set (lots of users"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_ec3ecbd8","line":226,"in_reply_to":"9f436f4f_0cb90f79","updated":"2017-08-10 21:59:24.000000000","message":"We do this already by invalidating the cache when a user is added or removed from a project: \n\nhttps://github.com/openstack/keystone/blob/6a1d5b0e4dad11a8c99fc2da187df5a36cf83f49/keystone/assignment/core.py#L181\n\nhttps://github.com/openstack/keystone/blob/6a1d5b0e4dad11a8c99fc2da187df5a36cf83f49/keystone/assignment/core.py#L222\n\nhttps://github.com/openstack/keystone/blob/6a1d5b0e4dad11a8c99fc2da187df5a36cf83f49/keystone/assignment/core.py#L289","commit_id":"63124f703a81074793360c1b91711b6ee5a76196"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"8d6d2517c5c0c8acdfa9f083519e695d46a7ad32","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # TODO(henry-nash): We might want to consider list limiting this at some"},{"line_number":243,"context_line":"    # point in the future."},{"line_number":244,"context_line":"    @MEMOIZE_COMPUTED_ASSIGNMENTS"},{"line_number":245,"context_line":"    def list_domains_for_user(self, user_id):"},{"line_number":246,"context_line":"        assignment_list \u003d self.list_role_assignments("},{"line_number":247,"context_line":"            user_id\u003duser_id, effective\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_acad6332","line":244,"range":{"start_line":244,"start_character":5,"end_line":244,"end_character":33},"updated":"2017-08-10 21:55:35.000000000","message":"same as above","commit_id":"63124f703a81074793360c1b91711b6ee5a76196"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4640499480d747f9d5a67a5ab0ba2ebf2f1d369b","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # TODO(henry-nash): We might want to consider list limiting this at some"},{"line_number":243,"context_line":"    # point in the future."},{"line_number":244,"context_line":"    @MEMOIZE_COMPUTED_ASSIGNMENTS"},{"line_number":245,"context_line":"    def list_domains_for_user(self, user_id):"},{"line_number":246,"context_line":"        assignment_list \u003d self.list_role_assignments("},{"line_number":247,"context_line":"            user_id\u003duser_id, effective\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_cc2547c4","line":244,"in_reply_to":"9f436f4f_acad6332","updated":"2017-08-10 21:59:24.000000000","message":"Ditto","commit_id":"63124f703a81074793360c1b91711b6ee5a76196"}],"keystone/resource/core.py":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"eabe4dc4f144aac813071b943802370396249fc9","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"            notifications.Audit.disabled(self._PROJECT, project_id,"},{"line_number":334,"context_line":"                                         public\u003dFalse)"},{"line_number":335,"context_line":"            # Drop the computed assignments if the project is being disabled."},{"line_number":336,"context_line":"            # This ensures an accurate list of projects is returned when list"},{"line_number":337,"context_line":"            # user projects based on assignments."},{"line_number":338,"context_line":"            assignment.COMPUTED_ASSIGNMENTS_REGION.invalidate()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if cascade:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_4b54e1ca","line":337,"range":{"start_line":335,"start_character":14,"end_line":337,"end_character":49},"updated":"2017-08-08 23:24:05.000000000","message":"why, don\u0027t we want to list disabled projects when we list projects for a user?","commit_id":"c1d922c02423d3066bbddc12e76496eba1d447fe"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"593fe481d70adaea1bdf7a2fdd4d45f94a281271","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                                         public\u003dFalse)"},{"line_number":335,"context_line":"            # Drop the computed assignments if the project is being disabled."},{"line_number":336,"context_line":"            # This ensures an accurate list of projects is returned when list"},{"line_number":337,"context_line":"            # user projects based on assignments."},{"line_number":338,"context_line":"            assignment.COMPUTED_ASSIGNMENTS_REGION.invalidate()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if cascade:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_11d3a83a","line":337,"in_reply_to":"9f436f4f_4b54e1ca","updated":"2017-08-09 01:24:57.000000000","message":"This is covering the case where: \n\n  - a user lists all projects they have access to via GET /v3/users/{user_id}/projects\n  - an admin disables a project the user has access to\n  - the user still sees the disable project in the list because the cache wasn\u0027t invalidated","commit_id":"c1d922c02423d3066bbddc12e76496eba1d447fe"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"273bd912bf4afcde520f6cbad5d7a830d4988b0e","unresolved":false,"context_lines":[{"line_number":335,"context_line":"            # Drop the computed assignments if the project is being disabled."},{"line_number":336,"context_line":"            # This ensures an accurate list of projects is returned when list"},{"line_number":337,"context_line":"            # user projects based on assignments."},{"line_number":338,"context_line":"            assignment.COMPUTED_ASSIGNMENTS_REGION.invalidate()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if cascade:"},{"line_number":341,"context_line":"            self._only_allow_enabled_to_update_cascade(project,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_4b63c1dd","line":338,"updated":"2017-08-08 23:17:40.000000000","message":"this should be invalidated not only in this case\n\nalso when a grant for that \u003cuser\u003e is removed or added, when a new project is added (may have an inherited grant for that \u003cuser\u003e in a parent), when a project is also removed (for the same reason).\n\nreplace \u003cuser\u003e with \u003cgroup in which that user is in\u003e in the sentence above.\n\nwhen a group that user was in is deleted. when the user is added to a new group too.\n\nthose should be all cases.","commit_id":"c1d922c02423d3066bbddc12e76496eba1d447fe"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"eabe4dc4f144aac813071b943802370396249fc9","unresolved":false,"context_lines":[{"line_number":335,"context_line":"            # Drop the computed assignments if the project is being disabled."},{"line_number":336,"context_line":"            # This ensures an accurate list of projects is returned when list"},{"line_number":337,"context_line":"            # user projects based on assignments."},{"line_number":338,"context_line":"            assignment.COMPUTED_ASSIGNMENTS_REGION.invalidate()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if cascade:"},{"line_number":341,"context_line":"            self._only_allow_enabled_to_update_cascade(project,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_8bc52991","line":338,"in_reply_to":"9f436f4f_4b63c1dd","updated":"2017-08-08 23:24:05.000000000","message":"hmm. it\u0027s using the same COMPUTED_ASSIGNMENTS_REGION that was already used. so all those cases are already covered. I am wondering why we really need this case, see question above","commit_id":"c1d922c02423d3066bbddc12e76496eba1d447fe"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"57ee03abaf923958666cdc90235f484f35092167","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            # This ensures an accurate list of projects is returned when"},{"line_number":337,"context_line":"            # listing projects/domains for a user based on role assignments."},{"line_number":338,"context_line":"            assignment.COMPUTED_ASSIGNMENTS_REGION.invalidate()"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        if cascade:"},{"line_number":341,"context_line":"            self._only_allow_enabled_to_update_cascade(project,"},{"line_number":342,"context_line":"                                                       original_project)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_9069b726","line":339,"updated":"2017-08-09 20:24:05.000000000","message":"dicussed this on the IRC again\n\nthis is needed because, evne if the actual response from list_role_assignments will be the same after disabling a project, the return of list_projects_for_user would be different, because it does\n\n    return self.resource_api.list_projects_from_ids(project_ids)\n\nas we don\u0027t want to create another cache region just for this (and do not invalidate the region COMPUTED_ASSIGNMENTS_REGION when the assignments are actually still valid), I think it is fine to do this here","commit_id":"63124f703a81074793360c1b91711b6ee5a76196"}]}
