)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"d933c70f0219f85b3838f93f82a60645dc4a5225","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added Role base authentication support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Mistral api access can be restrict basse on role"},{"line_number":10,"context_line":"by modifying /etc/mistral/policy.json file."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I4c78ca4cc04d25f46aea55948bce339cfe460ff0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7aa08908_d4a854de","line":9,"range":{"start_line":9,"start_character":26,"end_line":9,"end_character":40},"updated":"2016-06-09 10:28:12.000000000","message":"-\u003e restricted based","commit_id":"ecde4306f4221747cdb7af2d409d75b42ca45b9d"}],"etc/policy.json":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"7061409d899192f38511615d63e87a499c568ced","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"workflows:delete\": \"rule:admin_or_owner\","},{"line_number":55,"context_line":"    \"workflows:get\": \"rule:admin_or_owner\","},{"line_number":56,"context_line":"    \"workflows:list\": \"rule:admin_or_owner\","},{"line_number":57,"context_line":"    \"workflows:update\": \"rule:admin_or_owner\","},{"line_number":58,"context_line":"}"}],"source_content_type":"application/json","patch_set":6,"id":"7aa08908_006a04b3","line":57,"range":{"start_line":57,"start_character":45,"end_line":57,"end_character":46},"updated":"2016-06-13 11:33:56.000000000","message":"Soft: Unnecessary comma may lead to fail if this json would be load using json.loads.","commit_id":"59c78fb07c52cc30969c507c30d1dbc82fa34570"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"f32d10dec9416b7d4c9151029ba53174d314dccf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"workflows:delete\": \"rule:admin_or_owner\","},{"line_number":55,"context_line":"    \"workflows:get\": \"rule:admin_or_owner\","},{"line_number":56,"context_line":"    \"workflows:list\": \"rule:admin_or_owner\","},{"line_number":57,"context_line":"    \"workflows:update\": \"rule:admin_or_owner\","},{"line_number":58,"context_line":"}"}],"source_content_type":"application/json","patch_set":6,"id":"7aa08908_4b1d2861","line":57,"range":{"start_line":57,"start_character":45,"end_line":57,"end_character":46},"in_reply_to":"7aa08908_006a04b3","updated":"2016-06-14 04:12:56.000000000","message":"Thanks","commit_id":"59c78fb07c52cc30969c507c30d1dbc82fa34570"}],"mistral/api/access_control.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"d933c70f0219f85b3838f93f82a60645dc4a5225","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def enforce(action, context, target, do_raise\u003dTrue,"},{"line_number":47,"context_line":"            exc\u003dexc.NotAllowedException):"},{"line_number":48,"context_line":"    global _ENFORCER"},{"line_number":49,"context_line":"    if not _ENFORCER:"},{"line_number":50,"context_line":"        _ENFORCER \u003d policy.Enforcer(cfg.CONF)"},{"line_number":51,"context_line":"        _ENFORCER.load_rules()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    return _ENFORCER.enforce("},{"line_number":54,"context_line":"        action,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_71f1b295","line":51,"range":{"start_line":48,"start_character":4,"end_line":51,"end_character":30},"updated":"2016-06-09 10:28:12.000000000","message":"Can we remove duplication between 48-51 and 36-39? I would create method _ensure_enforcer_initialized() or something like that.","commit_id":"ecde4306f4221747cdb7af2d409d75b42ca45b9d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"ceb96171454b8e9cfa8a5938705d9d92fa66f550","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return app"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def enforce(action, context, target\u003dNone, do_raise\u003dTrue,"},{"line_number":43,"context_line":"            exc\u003dexc.NotAllowedException):"},{"line_number":44,"context_line":"    target_obj \u003d {"},{"line_number":45,"context_line":"        \u0027project_id\u0027: context.project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_7cb8a9c8","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":11},"updated":"2016-06-14 08:06:08.000000000","message":"Soft: I think this method deserves a good docstring with full description of what it is for and description of all of its parameters. Otherwise, it\u0027s hard to understand how to use it.","commit_id":"11e443efeb77b9198c6357611ed135838c33c16a"},{"author":{"_account_id":18238,"name":"Hardik Parekh","email":"hardik.parekh047@gmail.com","username":"hparekh"},"change_message_id":"f7eb4d98356b9f13c70670452b5f73a0757305c0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        return app"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def enforce(action, context, target\u003dNone, do_raise\u003dTrue,"},{"line_number":43,"context_line":"            exc\u003dexc.NotAllowedException):"},{"line_number":44,"context_line":"    target_obj \u003d {"},{"line_number":45,"context_line":"        \u0027project_id\u0027: context.project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_bf1e835c","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":11},"in_reply_to":"7aa08908_7cb8a9c8","updated":"2016-06-14 08:16:00.000000000","message":"Thanks Renat !! Sure I will add doc string for method in another patch.","commit_id":"11e443efeb77b9198c6357611ed135838c33c16a"}],"mistral/api/controllers/v2/action_execution.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"d933c70f0219f85b3838f93f82a60645dc4a5225","unresolved":false,"context_lines":[{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def _check_policy(action, context, target_obj\u003dNone):"},{"line_number":39,"context_line":"    target \u003d {"},{"line_number":40,"context_line":"        \u0027project_id\u0027: context.project_id,"},{"line_number":41,"context_line":"        \u0027user_id\u0027: context.user_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_71a9b224","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":51},"updated":"2016-06-09 10:28:12.000000000","message":"This method is repeated in every controller. I suggest we just move it up the controller hierarchy so that it\u0027s accessible for all controllers. Just make it a little bit more generic.","commit_id":"ecde4306f4221747cdb7af2d409d75b42ca45b9d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"d933c70f0219f85b3838f93f82a60645dc4a5225","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027user_id\u0027: context.user_id,"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":"    target.update(target_obj or {})"},{"line_number":44,"context_line":"    _action \u003d \u0027action_executions:%s\u0027 % action"},{"line_number":45,"context_line":"    acl.enforce(_action, context, target)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_51547620","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":11},"updated":"2016-06-09 10:28:12.000000000","message":"Soft: I would get rid of this intermediate _action variable and inline it in acl.enforce() call.","commit_id":"ecde4306f4221747cdb7af2d409d75b42ca45b9d"}]}
