)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c8f2b0f691fcffc2d53bfb31cdd3cd318b58b904","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently extra specs are only shown to the admin user"},{"line_number":10,"context_line":"when showing volume types. This patch grants the flexibility"},{"line_number":11,"context_line":"to grant other users privelages to see them based on policy."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"It also hides the extra_specs entry in the dictionary from"},{"line_number":14,"context_line":"users who can\u0027t see it rather than just showing \"None\" as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a29b11f_f29b9a70","line":11,"updated":"2015-10-20 16:05:58.000000000","message":"s/privelages/privileges ?","commit_id":"13ee6996e97b1f66492b9236abc9f04865a502c8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c8f2b0f691fcffc2d53bfb31cdd3cd318b58b904","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to grant other users privelages to see them based on policy."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"It also hides the extra_specs entry in the dictionary from"},{"line_number":14,"context_line":"users who can\u0027t see it rather than just showing \"None\" as"},{"line_number":15,"context_line":"the value."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1504577"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a29b11f_d278def4","line":14,"updated":"2015-10-20 16:05:58.000000000","message":"This is non-backward compatible change which may break any scripts users had written. Should we allow it?\n\nIn my opinion it\u0027s minor and trivial, so I\u0027m fine with this change, but I wanted to raise this.","commit_id":"13ee6996e97b1f66492b9236abc9f04865a502c8"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"e08e03b2c40f1f7be301ba427235f33b26edcf60","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently extra specs are only shown to the admin user"},{"line_number":10,"context_line":"when showing volume types. This patch grants the flexibility"},{"line_number":11,"context_line":"to grant other users privelages to see them based on policy."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"It also hides the extra_specs entry in the dictionary from"},{"line_number":14,"context_line":"users who can\u0027t see it rather than just showing \"None\" as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fa80f949_b20b357d","line":11,"updated":"2015-11-03 14:32:07.000000000","message":"s/privelages/privileges/","commit_id":"94714e761a894049534e22894c5e8b097876e677"}],"cinder/api/v2/types.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"c3bb6c6af136d8842da6adb153a3128068811beb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":67,"context_line":"        }"},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            action \u003d \u0027volume_extension:access_types_extra_specs\u0027"},{"line_number":70,"context_line":"            cinder.policy.enforce(context, action, target)"},{"line_number":71,"context_line":"            return True"},{"line_number":72,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_df1d8174","line":69,"updated":"2015-10-19 16:31:22.000000000","message":"You need to add this to etc/cinder/policy.json with \"rule:admin_api\".","commit_id":"2c815e33a21cf59c5b8541e4c637682e18cc6f79"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"92cc4c640dbfe1092b5c4ec6b1a19c8c8e810486","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"\"\"Return a single volume type item.\"\"\""},{"line_number":85,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if self._validate_policy(context):"},{"line_number":88,"context_line":"            context \u003d ctx.get_admin_context()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # get default volume type"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_a2142244","line":87,"updated":"2015-10-19 20:05:24.000000000","message":"Should add a conditional to check of we already have admin context:\nif not context.is_admin and self._validate_policy(context):","commit_id":"471b21d48d9a4936f21e19920964b3657a33e24e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"31e77378d0457213d801ec2ab30a2ef9a4e5af4f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"\"\"Return a single volume type item.\"\"\""},{"line_number":85,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if self._validate_policy(context):"},{"line_number":88,"context_line":"            context \u003d ctx.get_admin_context()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # get default volume type"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_e2121a62","line":87,"in_reply_to":"3a29b11f_a2142244","updated":"2015-10-19 20:24:04.000000000","message":"Done","commit_id":"471b21d48d9a4936f21e19920964b3657a33e24e"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"92cc4c640dbfe1092b5c4ec6b1a19c8c8e810486","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Helper function that returns a list of type dicts.\"\"\""},{"line_number":128,"context_line":"        filters \u003d {}"},{"line_number":129,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":130,"context_line":"        if self._validate_policy(context):"},{"line_number":131,"context_line":"            context \u003d ctx.get_admin_context()"},{"line_number":132,"context_line":"        if context.is_admin:"},{"line_number":133,"context_line":"            # Only admin has query access to all volume types"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_8219e67b","line":130,"updated":"2015-10-19 20:05:24.000000000","message":"Should add a conditional to check of we already have admin context:\nif not context.is_admin and self._validate_policy(context):","commit_id":"471b21d48d9a4936f21e19920964b3657a33e24e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"31e77378d0457213d801ec2ab30a2ef9a4e5af4f","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Helper function that returns a list of type dicts.\"\"\""},{"line_number":128,"context_line":"        filters \u003d {}"},{"line_number":129,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":130,"context_line":"        if self._validate_policy(context):"},{"line_number":131,"context_line":"            context \u003d ctx.get_admin_context()"},{"line_number":132,"context_line":"        if context.is_admin:"},{"line_number":133,"context_line":"            # Only admin has query access to all volume types"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_a20d0240","line":130,"in_reply_to":"3a29b11f_8219e67b","updated":"2015-10-19 20:24:04.000000000","message":"Done","commit_id":"471b21d48d9a4936f21e19920964b3657a33e24e"}],"cinder/tests/unit/api/v2/test_types.py":[{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"ec024d12aef052a4b9037bdc9310bb013dea3579","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        self.stubs.Set(volume_types, \u0027get_all_types\u0027,"},{"line_number":86,"context_line":"                       return_volume_types_get_all_types)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types\u0027, use_admin_context\u003dTrue)"},{"line_number":89,"context_line":"        res_dict \u003d self.controller.index(req)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.assertEqual(3, len(res_dict[\u0027volume_types\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_efb74af3","line":88,"updated":"2015-10-29 18:28:58.000000000","message":"Would we need cover the case if we do not use admin_context (use_admin_context\u003dFalse)?","commit_id":"94714e761a894049534e22894c5e8b097876e677"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"00d268065d35a04f919b9d504f13b73ea2d9a716","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        self.stubs.Set(volume_types, \u0027get_all_types\u0027,"},{"line_number":86,"context_line":"                       return_volume_types_get_all_types)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types\u0027, use_admin_context\u003dTrue)"},{"line_number":89,"context_line":"        res_dict \u003d self.controller.index(req)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.assertEqual(3, len(res_dict[\u0027volume_types\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_3a36c252","line":88,"in_reply_to":"1a26ad4f_8ab00445","updated":"2015-10-30 15:40:27.000000000","message":"Ah, I missed that part. So I think this patch would be ok if we did not add a test. Though to be on the safe side, adding a test like you mentioned would still be nice just to make sure new branches are being covered.","commit_id":"94714e761a894049534e22894c5e8b097876e677"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"6c182ae7013f8d4751cfa9ea28d3b57a1ac080ee","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        self.stubs.Set(volume_types, \u0027get_all_types\u0027,"},{"line_number":86,"context_line":"                       return_volume_types_get_all_types)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types\u0027, use_admin_context\u003dTrue)"},{"line_number":89,"context_line":"        res_dict \u003d self.controller.index(req)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.assertEqual(3, len(res_dict[\u0027volume_types\u0027]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_8ab00445","line":88,"in_reply_to":"1a26ad4f_efb74af3","updated":"2015-10-29 18:52:04.000000000","message":"Sure, I could add one in - I didn\u0027t before because calling show and list on volume types is covered with admin and non-admin roles later in the file, and it didn\u0027t seem like ensuring extra_specs existed here was the focus of this test. Do you think it would be worth adding another test in and just asserting the value of the volume_type\u0027s names match what they\u0027re supposed to?","commit_id":"94714e761a894049534e22894c5e8b097876e677"}],"etc/cinder/policy.json":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c8f2b0f691fcffc2d53bfb31cdd3cd318b58b904","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"volume_extension:types_manage\": \"rule:admin_api\","},{"line_number":27,"context_line":"    \"volume_extension:types_extra_specs\": \"rule:admin_api\","},{"line_number":28,"context_line":"    \"volume_extension:access_types_extra_specs\": \"rule:admin_api\","},{"line_number":29,"context_line":"    \"volume_extension:volume_type_access\": \"rule:admin_or_owner\","},{"line_number":30,"context_line":"    \"volume_extension:volume_type_access:addProjectAccess\": \"rule:admin_api\","},{"line_number":31,"context_line":"    \"volume_extension:volume_type_access:removeProjectAccess\": \"rule:admin_api\","}],"source_content_type":"application/json","patch_set":5,"id":"3a29b11f_55f4b8f0","line":28,"updated":"2015-10-20 16:05:58.000000000","message":"Thanks to default rule (line 2) this is passing Grenade tests, but you may consider adding UpgradeImpact to commit message if you will be forced to upload another patchset.","commit_id":"13ee6996e97b1f66492b9236abc9f04865a502c8"}]}
