)]}'
{"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"93f22401f2188173cea38856fda290866b81c48c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return update"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def authorize(self, context, action_name):"},{"line_number":82,"context_line":"        # NOTE(tommylike): We have two different ways to authorize during"},{"line_number":83,"context_line":"        # implementing code base policies, the if/else statement can be"},{"line_number":84,"context_line":"        # removed when all resources are upgraded."},{"line_number":85,"context_line":"        if self.resource_name in [\u0027backup\u0027]:"},{"line_number":86,"context_line":"            context.authorize("},{"line_number":87,"context_line":"                \u0027volume_extension:%(resource)s_admin_actions:%(action)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f4e5783_302113b6","line":84,"range":{"start_line":82,"start_character":8,"end_line":84,"end_character":50},"updated":"2017-10-10 17:37:42.000000000","message":"Why is this the case? Regardless of where the policies come from, they should end up as RuleDefault or DocumentedRuleDefault objects in an instance of Enforcer().\n\nIt seems like we\u0027re keeping a specific case around for policies that come from files, which is still possible after all policies are registered in code.","commit_id":"8c97aabb46cb2da915cedf02c9d84d67bf5cd81d"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"26137b2c48d5a1c3805c4f9e157b59528d23156a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return update"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def authorize(self, context, action_name):"},{"line_number":82,"context_line":"        # NOTE(tommylike): We have two different ways to authorize during"},{"line_number":83,"context_line":"        # implementing code base policies, the if/else statement can be"},{"line_number":84,"context_line":"        # removed when all resources are upgraded."},{"line_number":85,"context_line":"        if self.resource_name in [\u0027backup\u0027]:"},{"line_number":86,"context_line":"            context.authorize("},{"line_number":87,"context_line":"                \u0027volume_extension:%(resource)s_admin_actions:%(action)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f4e5783_35c9f777","line":84,"range":{"start_line":82,"start_character":8,"end_line":84,"end_character":50},"in_reply_to":"5f4e5783_302113b6","updated":"2017-10-11 01:29:30.000000000","message":"Looks like you are right :)","commit_id":"8c97aabb46cb2da915cedf02c9d84d67bf5cd81d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"894919fcd5d65cca04f7b937bb4b2f0b15212c9a","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return update"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def authorize(self, context, action_name):"},{"line_number":82,"context_line":"        # NOTE(tommylikehu): We have two different ways to authorize during"},{"line_number":83,"context_line":"        # implementing code base policies, the if/else statement can be"},{"line_number":84,"context_line":"        # removed when all resources are upgraded."},{"line_number":85,"context_line":"        if self.resource_name in [\u0027snapshot\u0027]:"},{"line_number":86,"context_line":"            context.authorize("},{"line_number":87,"context_line":"                \u0027volume_extension:%(resource)s_admin_actions:%(action)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f4e5783_a2bfccce","side":"PARENT","line":84,"range":{"start_line":82,"start_character":8,"end_line":84,"end_character":50},"updated":"2017-10-11 19:25:42.000000000","message":"I\u0027m still wondering about this. How come authorization differs if the policy is in code versus in a file? Even after all the policies are moved into code it\u0027s still possible for a deployer to specific overrides from a file. That\u0027s not going to break here, is it?","commit_id":"274ce06f58fbb1db63a10da426f5a797723a64a2"}],"cinder/policies/backups.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"93eb5ce7714e86d8b578a86654a2218d1c439200","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        name\u003dGET_ALL_POLICY,"},{"line_number":34,"context_line":"        check_str\u003dbase.RULE_ADMIN_OR_OWNER,"},{"line_number":35,"context_line":"        description\u003d\"List backups.\","},{"line_number":36,"context_line":"        operations\u003d["},{"line_number":37,"context_line":"            {"},{"line_number":38,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"},{"line_number":39,"context_line":"                \u0027path\u0027: \u0027/backups\u0027"},{"line_number":40,"context_line":"            },"},{"line_number":41,"context_line":"            {"},{"line_number":42,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"},{"line_number":43,"context_line":"                \u0027path\u0027: \u0027/backups/detail\u0027"},{"line_number":44,"context_line":"            }"},{"line_number":45,"context_line":"        ]),"},{"line_number":46,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":47,"context_line":"        name\u003dBACKUP_ATTRIBUTES_POLICY,"},{"line_number":48,"context_line":"        check_str\u003dbase.RULE_ADMIN_API,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f4e5783_f08edbce","line":45,"range":{"start_line":36,"start_character":8,"end_line":45,"end_character":11},"updated":"2017-10-10 17:35:45.000000000","message":"These could even be broken into their own policies so that the description can highlight the differences between them. The main reason for allowing a list of operations was to support cases where you have two methods that are possible on the same path ( GET|HEAD some/resource/path)\n\nThis could be applied throughout the patch.","commit_id":"8c97aabb46cb2da915cedf02c9d84d67bf5cd81d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0b0d9710143a8d9ec0ba637c2d8d711cf9ad6c3f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        name\u003dGET_ALL_POLICY,"},{"line_number":34,"context_line":"        check_str\u003dbase.RULE_ADMIN_OR_OWNER,"},{"line_number":35,"context_line":"        description\u003d\"List backups.\","},{"line_number":36,"context_line":"        operations\u003d["},{"line_number":37,"context_line":"            {"},{"line_number":38,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"},{"line_number":39,"context_line":"                \u0027path\u0027: \u0027/backups\u0027"},{"line_number":40,"context_line":"            },"},{"line_number":41,"context_line":"            {"},{"line_number":42,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"},{"line_number":43,"context_line":"                \u0027path\u0027: \u0027/backups/detail\u0027"},{"line_number":44,"context_line":"            }"},{"line_number":45,"context_line":"        ]),"},{"line_number":46,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":47,"context_line":"        name\u003dBACKUP_ATTRIBUTES_POLICY,"},{"line_number":48,"context_line":"        check_str\u003dbase.RULE_ADMIN_API,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f4e5783_0bb82628","line":45,"range":{"start_line":36,"start_character":8,"end_line":45,"end_character":11},"in_reply_to":"5f4e5783_f08edbce","updated":"2017-10-10 17:43:54.000000000","message":"Actually - maybe not since they are both protected by the same policy.name.","commit_id":"8c97aabb46cb2da915cedf02c9d84d67bf5cd81d"}]}
