)]}'
{"ironic/api/controllers/v1/utils.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0358c9ffbc78dc6430251c6184c3d7f6dc21d2fa","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"    policy.authorize(policy_name, cdict, cdict)"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"def check_owner_policy(object_type, policy_name, owner):"},{"line_number":1171,"context_line":"    \"\"\"Check if the policy authorizes this request on an object."},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"    :param: object_type: type of object being checked"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_ce6c7bd1","line":1170,"updated":"2020-02-18 20:28:07.000000000","message":"same comment as below.","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"313092343097c25718dc93251183ef9cfe3f3159","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"    return rpc_allocation"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"def check_list_policy(object_type, owner\u003dNone):"},{"line_number":1239,"context_line":"    \"\"\"Check if the list policy authorizes this request on an object."},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":"    :param: object_type: type of object being checked"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_009f9ef6","line":1238,"updated":"2020-02-20 14:02:33.000000000","message":"I don\u0027t think we ever freak out about internal functions, especially here in the API layer which is not used by drivers.","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0358c9ffbc78dc6430251c6184c3d7f6dc21d2fa","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"    return rpc_allocation"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"def check_list_policy(object_type, owner\u003dNone):"},{"line_number":1239,"context_line":"    \"\"\"Check if the list policy authorizes this request on an object."},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":"    :param: object_type: type of object being checked"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4e3f2bb2","line":1238,"updated":"2020-02-18 20:28:07.000000000","message":"normally we would freak a little at a public utility method being renamed, but this was all done with-in a cycle, so I think it is fine.","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"313092343097c25718dc93251183ef9cfe3f3159","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"    \"\"\""},{"line_number":1247,"context_line":"    cdict \u003d api.request.context.to_policy_values()"},{"line_number":1248,"context_line":"    try:"},{"line_number":1249,"context_line":"        policy.authorize(\u0027baremetal:\u0027 + object_type + \u0027:list_all\u0027,"},{"line_number":1250,"context_line":"                         cdict, cdict)"},{"line_number":1251,"context_line":"    except exception.HTTPForbidden:"},{"line_number":1252,"context_line":"        project_owner \u003d cdict.get(\u0027project_id\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a05b2a5f","line":1249,"updated":"2020-02-20 14:02:33.000000000","message":"nit: ideally use string formatting \"baremetal:%s:list_all\"","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"b3aa8c0f6fd6290b6b8ee6490e80a15c294c4de1","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"    \"\"\""},{"line_number":1247,"context_line":"    cdict \u003d api.request.context.to_policy_values()"},{"line_number":1248,"context_line":"    try:"},{"line_number":1249,"context_line":"        policy.authorize(\u0027baremetal:\u0027 + object_type + \u0027:list_all\u0027,"},{"line_number":1250,"context_line":"                         cdict, cdict)"},{"line_number":1251,"context_line":"    except exception.HTTPForbidden:"},{"line_number":1252,"context_line":"        project_owner \u003d cdict.get(\u0027project_id\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_6676aa95","line":1249,"in_reply_to":"3fa7e38b_a05b2a5f","updated":"2020-02-20 15:24:06.000000000","message":"Ah, right - fixed!","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"313092343097c25718dc93251183ef9cfe3f3159","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"        project_owner \u003d cdict.get(\u0027project_id\u0027)"},{"line_number":1253,"context_line":"        if (not project_owner or (owner and owner !\u003d project_owner)):"},{"line_number":1254,"context_line":"            raise"},{"line_number":1255,"context_line":"        policy.authorize(\u0027baremetal:\u0027 + object_type + \u0027:list\u0027, cdict, cdict)"},{"line_number":1256,"context_line":"        return project_owner"},{"line_number":1257,"context_line":"    return owner"},{"line_number":1258,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_c05e664f","line":1255,"updated":"2020-02-20 14:02:33.000000000","message":"ditto","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"b3aa8c0f6fd6290b6b8ee6490e80a15c294c4de1","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"        project_owner \u003d cdict.get(\u0027project_id\u0027)"},{"line_number":1253,"context_line":"        if (not project_owner or (owner and owner !\u003d project_owner)):"},{"line_number":1254,"context_line":"            raise"},{"line_number":1255,"context_line":"        policy.authorize(\u0027baremetal:\u0027 + object_type + \u0027:list\u0027, cdict, cdict)"},{"line_number":1256,"context_line":"        return project_owner"},{"line_number":1257,"context_line":"    return owner"},{"line_number":1258,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_468b6e69","line":1255,"in_reply_to":"3fa7e38b_c05e664f","updated":"2020-02-20 15:24:06.000000000","message":"Fixed as well!","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"}],"releasenotes/notes/allocation-owner-policy-162c43b3abb91c76.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"313092343097c25718dc93251183ef9cfe3f3159","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    Allocation processing will then ensure that only nodes with the same owner"},{"line_number":7,"context_line":"    are matched. Additional allocation APIs may be available if exposed through"},{"line_number":8,"context_line":"    the ``is_allocation_owner`` policy rule. Default rules are unaffected, so"},{"line_number":9,"context_line":"    default behavior is unchanged."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_6065321c","line":9,"updated":"2020-02-20 14:02:33.000000000","message":"We have a already made a release with this note, so it shouldn\u0027t be updated :( Let us create a new note.","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"b3aa8c0f6fd6290b6b8ee6490e80a15c294c4de1","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    Allocation processing will then ensure that only nodes with the same owner"},{"line_number":7,"context_line":"    are matched. Additional allocation APIs may be available if exposed through"},{"line_number":8,"context_line":"    the ``is_allocation_owner`` policy rule. Default rules are unaffected, so"},{"line_number":9,"context_line":"    default behavior is unchanged."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_66eb0a11","line":9,"in_reply_to":"3fa7e38b_6065321c","updated":"2020-02-20 15:24:06.000000000","message":"Ah, I didn\u0027t realize - thanks for pointing this out! Fixed.","commit_id":"0d7d17fdde3259c5b4e42c539460b234905deb3b"}]}
