)]}'
{"patrole_tempest_plugin/rbac_role_converter.py":[{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"9c29b8c3e444461866e39dfb638c29b1df39b4cd","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        access_data[\u0027roles\u0027] \u003d [role[\u0027name\u0027] for role in access_data[\u0027roles\u0027]]"},{"line_number":125,"context_line":"        access_data[\u0027project_id\u0027] \u003d access_data[\u0027project\u0027][\u0027id\u0027]"},{"line_number":126,"context_line":"        access_data[\u0027is_admin\u0027] \u003d is_admin"},{"line_number":127,"context_line":"        # TODO(fmonteiro): Dynamically calculate is_admin_project"},{"line_number":128,"context_line":"        access_data[\u0027is_admin_project\u0027] \u003d True"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        class Object(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_79d38204","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":65},"updated":"2017-01-30 20:17:38.000000000","message":"Why was this not done?","commit_id":"0aa3f0dfc2010893bdf203f7f9a09b6a72790fbe"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"8ab6714d9b2185a6f674fdea84324089cf32ef72","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        access_data[\u0027roles\u0027] \u003d [role[\u0027name\u0027] for role in access_data[\u0027roles\u0027]]"},{"line_number":125,"context_line":"        access_data[\u0027project_id\u0027] \u003d access_data[\u0027project\u0027][\u0027id\u0027]"},{"line_number":126,"context_line":"        access_data[\u0027is_admin\u0027] \u003d is_admin"},{"line_number":127,"context_line":"        # TODO(fmonteiro): Dynamically calculate is_admin_project"},{"line_number":128,"context_line":"        access_data[\u0027is_admin_project\u0027] \u003d True"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        class Object(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_59d406bc","line":127,"range":{"start_line":127,"start_character":8,"end_line":127,"end_character":65},"in_reply_to":"3a461143_79d38204","updated":"2017-01-30 20:22:16.000000000","message":"Cinder policy files use is_admin_project. It\u0027s calculated by Keystone circa line 124 here: https://github.com/openstack/keystone/blob/49b74dd90a5bccd03b8432978ab92a7ef4ef727c/keystone/token/providers/common.py\n\nIf, for example, you changed admin_api in /etc/cinder/policy.json to \"role:admin and is_admin_project:True\", then even with role\u003dadmin and is_admin\u003dTrue being passed to oslo_policy, it would still fail. This mitigates that problem.\n\nIt\u0027s highly unlikely but still possible to add is_admin_project:False to the policy file, in which case I left dynamic calculation as a TODO, because it\u0027s a rare case that I\u0027m not sure how to handle right now.","commit_id":"0aa3f0dfc2010893bdf203f7f9a09b6a72790fbe"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"19f6cc395fc8eb3387a9dd2f061acd6252240468","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            rule \u003d self.rules[apply_rule]"},{"line_number":143,"context_line":"            return rule(target, access_data, o)"},{"line_number":144,"context_line":"        except KeyError as e:"},{"line_number":145,"context_line":"            LOG.debug(\"{0} not found in policy file.\".format(apply_rule))"},{"line_number":146,"context_line":"        except Exception as e:"},{"line_number":147,"context_line":"            LOG.debug(\"Exception: {0} for rule: {1}\".format(e, rule))"},{"line_number":148,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_f905b279","line":145,"range":{"start_line":145,"start_character":12,"end_line":145,"end_character":73},"updated":"2017-01-30 20:16:40.000000000","message":"Need to add return False","commit_id":"0aa3f0dfc2010893bdf203f7f9a09b6a72790fbe"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"ccfb7d09887df479bfe943bd4a52ef414c4da550","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        policy_data \u003d \"{}\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # If the policy file cannot be found, then use oslo_policy to fetch"},{"line_number":59,"context_line":"        # the rules for provided service."},{"line_number":60,"context_line":"        if not os.path.isfile(self.path):"},{"line_number":61,"context_line":"            policy_generator \u003d generator._get_policies_dict([service])"},{"line_number":62,"context_line":"            if policy_generator and service in policy_generator:"},{"line_number":63,"context_line":"                policy_data \u003d \"{\\n\""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_ef32440f","line":60,"range":{"start_line":58,"start_character":8,"end_line":60,"end_character":41},"updated":"2017-01-30 21:29:59.000000000","message":"If we can do this, why would we ever want to use the policy file?","commit_id":"1882813452a0dfda4e627a11082d0662216adc72"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c24f2a8452e06bb3abd88db178d5d66322c751bb","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        policy_data \u003d \"{}\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # If the policy file cannot be found, then use oslo_policy to fetch"},{"line_number":59,"context_line":"        # the rules for provided service."},{"line_number":60,"context_line":"        if not os.path.isfile(self.path):"},{"line_number":61,"context_line":"            policy_generator \u003d generator._get_policies_dict([service])"},{"line_number":62,"context_line":"            if policy_generator and service in policy_generator:"},{"line_number":63,"context_line":"                policy_data \u003d \"{\\n\""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_12c333ee","line":60,"range":{"start_line":58,"start_character":8,"end_line":60,"end_character":41},"in_reply_to":"3a461143_ef32440f","updated":"2017-01-30 21:51:28.000000000","message":"Done","commit_id":"1882813452a0dfda4e627a11082d0662216adc72"}]}
