)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"30a53e00b5b1ffb241af11e76c44d6132b374a8b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"juno-backport-potential"},{"line_number":17,"context_line":"kilo-backport-potential"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Fixes bug 968696"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I0cb99186bd833c4c32964490c4bc6da9ad42d320"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_664bb3b1","line":19,"updated":"2015-08-17 15:35:27.000000000","message":"closes-bug:","commit_id":"ce9292a5f5fa84cc00430b61cab6136bcaba0888"}],"cinder/policy.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"30a53e00b5b1ffb241af11e76c44d6132b374a8b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not roles contains \u0027admin\u0027 role according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    init()"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_8625a7c3","line":74,"updated":"2015-08-17 15:35:27.000000000","message":"Seems like the comment here should be updated to explain why roles and user_id are being used.","commit_id":"ce9292a5f5fa84cc00430b61cab6136bcaba0888"},{"author":{"_account_id":2101,"name":"Brent Roskos","email":"broskos@redhat.com","username":"broskos"},"change_message_id":"8333321ccd445aac222849fdbd9ab37df8ac4ae1","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not roles contains \u0027admin\u0027 role according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    init()"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_6b55bbc4","line":74,"in_reply_to":"fa1b9901_8625a7c3","updated":"2015-08-17 16:08:15.000000000","message":"Done","commit_id":"ce9292a5f5fa84cc00430b61cab6136bcaba0888"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"9185f9ec2a49b40cce3c33c87d7eb2c85af3352b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."},{"line_number":77,"context_line":"       In a multi-domain configuration, roles alone may not be sufficient."}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_1de9e11a","line":74,"updated":"2015-08-17 19:40:17.000000000","message":"Beginning of this comment is a little confusing.\n\nSuggestion: Change \"Whether or user is...\"  to \" Whether or not user is an ...\".","commit_id":"7c03f3f1f565ce9302d93ffd90d72e5a24a3445c"},{"author":{"_account_id":2101,"name":"Brent Roskos","email":"broskos@redhat.com","username":"broskos"},"change_message_id":"68d785ee6ba85541ede20f4f80bec1de48af4ced","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."},{"line_number":77,"context_line":"       In a multi-domain configuration, roles alone may not be sufficient."}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_e5f56f83","line":74,"in_reply_to":"fa1b9901_1de9e11a","updated":"2015-08-17 19:57:45.000000000","message":"Done.  Good catch, thank.","commit_id":"7c03f3f1f565ce9302d93ffd90d72e5a24a3445c"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"e8ee5f7673fbff14ccce5be7226a737535908417","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_3d3ff4d7","line":73,"updated":"2015-08-23 14:25:49.000000000","message":"Any way to change the signature here? As it is, if you\u0027ve missed any calls (or there are calls in private extensions etc) then they potentially get a silent breakage by passing in a role list here. Maybe change it to check_is_admin(context, roles)?","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"43d2bff3482fa1ba1c3c28b984b9c52a6edc15e7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_16eaf4ac","line":73,"in_reply_to":"fa1b9901_0885f305","updated":"2015-08-24 13:30:33.000000000","message":"Agree with Duncan, we should avoid some incompatible changes here.  I\u0027d prefer  to \"check_is_admin(roles, context\u003dNone)\".","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"},{"author":{"_account_id":2101,"name":"Brent Roskos","email":"broskos@redhat.com","username":"broskos"},"change_message_id":"4337561bcd0997edb92ac1588c50119c1542d4a6","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_76a1bba8","line":73,"in_reply_to":"fa1b9901_0885f305","updated":"2015-08-25 11:47:57.000000000","message":"Done","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"},{"author":{"_account_id":2101,"name":"Brent Roskos","email":"broskos@redhat.com","username":"broskos"},"change_message_id":"4337561bcd0997edb92ac1588c50119c1542d4a6","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_56aef798","line":73,"in_reply_to":"fa1b9901_16eaf4ac","updated":"2015-08-25 11:47:57.000000000","message":"Done","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"},{"author":{"_account_id":2101,"name":"Brent Roskos","email":"broskos@redhat.com","username":"broskos"},"change_message_id":"d546efba6c5cbcb73982444af766b29ed2129969","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_e0122f58","line":73,"in_reply_to":"fa1b9901_3d3ff4d7","updated":"2015-08-23 14:36:31.000000000","message":"It would be possible to change it to check_is_admin(roles, context\u003dNone).  Which would allow it to be used exactly as before, but also allow the use of context.  I\u0027d then have to ensure context exists before trying to use context.user_id.\n\nThat being said, this seems to add unnecessary complexity for what I think is an unlikely corner case.  Do you feel strongly about this, or are you just trying to be thorough?","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"},{"author":{"_account_id":1207,"name":"Duncan Thomas","email":"duncan.thomas@gmail.com","username":"duncan-thomas"},"change_message_id":"4141ae09af43f7d464923b9494b513045c97429a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                             action\u003daction)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def check_is_admin(context):"},{"line_number":74,"context_line":"    \"\"\"Whether or not user is admin according to policy setting."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"       Can use roles or user_id from context to determine if user is admin."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_0885f305","line":73,"in_reply_to":"fa1b9901_e0122f58","updated":"2015-08-24 12:41:57.000000000","message":"Since it looks like it is an easy and neat change to make, I\u0027d prefer you changed it please. Defensive programming is something we don\u0027t do enough of, and obscure bugs in the policy code (which isn\u0027t well tested currently on many code paths) is something I\u0027d very much like to avoid.\n\nThanks","commit_id":"f004ce91ce7e53d30ff475973c9a54951c72353a"}]}
