)]}'
{"keystone/models/token_model.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"37f227f19fdfdc6d6d2fa9d6fce0244da5d5c44f","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        # just assignments."},{"line_number":280,"context_line":"        assignments \u003d PROVIDERS.assignment_api.add_implied_roles(assignments)"},{"line_number":281,"context_line":"        for assignment in assignments:"},{"line_number":282,"context_line":"            role \u003d PROVIDERS.role_api.get_role(assignment[\u0027role_id\u0027])"},{"line_number":283,"context_line":"            roles.append({\u0027id\u0027: role[\u0027id\u0027], \u0027name\u0027: role[\u0027name\u0027]})"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        return roles"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_3222b9a4","line":282,"range":{"start_line":282,"start_character":12,"end_line":282,"end_character":69},"updated":"2018-09-05 13:01:16.000000000","message":"Do we really need to do this get here? Seems not very efficient, and it looks like add_implied_roles should be returning a list of refs, which I think should include the id and name?","commit_id":"ab5afbf8ea487fd9a9949f11495a8849497a44f9"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d3a6341eab742fe0b1bca8a5ba333f0bf3d5aae8","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        # just assignments."},{"line_number":280,"context_line":"        assignments \u003d PROVIDERS.assignment_api.add_implied_roles(assignments)"},{"line_number":281,"context_line":"        for assignment in assignments:"},{"line_number":282,"context_line":"            role \u003d PROVIDERS.role_api.get_role(assignment[\u0027role_id\u0027])"},{"line_number":283,"context_line":"            roles.append({\u0027id\u0027: role[\u0027id\u0027], \u0027name\u0027: role[\u0027name\u0027]})"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        return roles"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_375b4b54","line":282,"range":{"start_line":282,"start_character":12,"end_line":282,"end_character":69},"in_reply_to":"3f79a3b5_3222b9a4","updated":"2018-09-07 21:48:05.000000000","message":"Yeah - I agree. I realized the add_implied_roles() method didn\u0027t really do what I expected it too about halfway through the fix. I was thinking it would return a list of refs, but it actually communicates in \"assignments\", which don\u0027t contain full references of the entities involved :(\n\nIt gives you an id of the things in the assignment (group id, user id, role id, project, id, etc..) but not the reference, which isn\u0027t ideal here since we need the role \u0027id\u0027 and the \u0027role\u0027 name.\n\nHere\u0027s what it does when you ask for the data and run a test:\n\ndiff: http://paste.openstack.org/show/729713/\noutput: http://paste.openstack.org/show/729712/\n\nI was about to refactor the add_implied_roles method, but figured it would be out-of-scope for this patch.\n\nFWIW - after doing the system-scope assignment work, I think most of the assignment API needs to be rewritten to avoid cases like this.\n\nThoughts?","commit_id":"ab5afbf8ea487fd9a9949f11495a8849497a44f9"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"62a9902d206a815096f05a83ac232b99e1a44b8a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # user_id/group_id, project_id, et cetera). That method could probably"},{"line_number":278,"context_line":"        # be fixed to be more clear by operating on actual roles instead of"},{"line_number":279,"context_line":"        # just assignments."},{"line_number":280,"context_line":"        assignments \u003d PROVIDERS.assignment_api.add_implied_roles(assignments)"},{"line_number":281,"context_line":"        for assignment in assignments:"},{"line_number":282,"context_line":"            role \u003d PROVIDERS.role_api.get_role(assignment[\u0027role_id\u0027])"},{"line_number":283,"context_line":"            roles.append({\u0027id\u0027: role[\u0027id\u0027], \u0027name\u0027: role[\u0027name\u0027]})"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_3375b0c9","line":280,"updated":"2018-10-15 17:38:02.000000000","message":"Managers can do cross-manager calls. This should probably do the expansion in the for loop below. Also, IIRC role_api is something we want to collapse back down into core assignment so we don\u0027t need a role_api as well.","commit_id":"9051d403a336e082f8e699d2b826f1db55ddbd18"}]}
