)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"b7e2bb9155b61f1bebf034bfdfb61fd76375930a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Current model query for Port is still based on tenant_id, it forgets"},{"line_number":13,"context_line":"to check for network owner when context tenant_id is not port owner."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch will try to fix this."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I55328cb43207654b9bb4cfb732923982d020ab0a"},{"line_number":18,"context_line":"Closes-Bug: #1524357"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a740942_a3e17e00","line":15,"updated":"2015-12-10 05:35:03.000000000","message":"This patch will try to fix this -\u003e This patch fixes this issue\n\n\nAnd agree there has to be some Test cases for this change,","commit_id":"7764adf2eb9fc448881859bc8ba5079de05fa679"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"03b2d3ed6a97fc9754c22cdf5bb216ad04253464","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch fixes this issue."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I55328cb43207654b9bb4cfb732923982d020ab0a"},{"line_number":18,"context_line":"Closes-Bug: #1524357"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_87352bf8","line":18,"range":{"start_line":18,"start_character":13,"end_line":18,"end_character":20},"updated":"2016-01-13 18:54:17.000000000","message":"change this to 1498790. That bug is the one documented as a limitation of the DB code so we want this fix to visibly close that.","commit_id":"0e1b035e018e555af3ad54ce93383a50ac8ed6ea"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"44d66ba0ba61e90726f11a086ff2f5b625316d3d","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        if self.model_query_scope(context, original_model):"},{"line_number":318,"context_line":"            conditions |\u003d ("},{"line_number":319,"context_line":"                (models_v2.Port.network_id \u003d\u003d models_v2.Network.id) \u0026"},{"line_number":320,"context_line":"                (context.tenant_id \u003d\u003d models_v2.Network.tenant_id))"},{"line_number":321,"context_line":"        return conditions"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_a4379f4b","line":320,"updated":"2016-03-10 09:19:47.000000000","message":"Help me understand the logic of this query, because at first glance I might suspect this might be troublesome on networks with rbac where the network tenant id might differ from the port\u0027s one.\n\nHowever, from the unit test you added things seem to work smoothly","commit_id":"f40de1c646b9be0840a86915dab42ce1def0f384"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"b1ea8558b18ad075118d89384dc2325b3e10ac97","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        if self.model_query_scope(context, original_model):"},{"line_number":318,"context_line":"            conditions |\u003d ("},{"line_number":319,"context_line":"                (models_v2.Port.network_id \u003d\u003d models_v2.Network.id) \u0026"},{"line_number":320,"context_line":"                (context.tenant_id \u003d\u003d models_v2.Network.tenant_id))"},{"line_number":321,"context_line":"        return conditions"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_6f6b7e85","line":320,"in_reply_to":"5aef4532_a4379f4b","updated":"2016-03-11 02:19:28.000000000","message":"Hi, Salvatore, I will try to help you to describe the logic.\n\nFor network owner should be able to query all ports on its network, so when querying port, it should ignore port\u0027s tenant_id(indeed, for ports belong to network owner, it will match filter condition: model.tenant_id \u003d\u003d context.tenant_id), and filter all ports on its network. So the logic in L319-L320 is try to tell:\n\n  first, we should know which networks belong to context tenant.(L320)\n  second, we query all ports on those networks.(L319)\n\nMaybe I should change the two lines\u0027 order.","commit_id":"f40de1c646b9be0840a86915dab42ce1def0f384"}],"neutron/policy.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1c9e3cf51832454f95b68653f60e1db0c0498ecb","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    match_rule \u003d policy.RuleCheck(\u0027rule\u0027, action)"},{"line_number":155,"context_line":"    resource, is_write \u003d get_resource_and_action(action, pluralized)"},{"line_number":156,"context_line":"    attr_rule_skipped \u003d action_skip_check(action)"},{"line_number":157,"context_line":"    # Attribute-based checks shall not be enforced on GETs"},{"line_number":158,"context_line":"    if is_write and not attr_rule_skipped:"},{"line_number":159,"context_line":"        # assigning to variable with short name for improving readability"},{"line_number":160,"context_line":"        res_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a57f1b5_a5376ae2","line":157,"updated":"2016-02-10 00:37:56.000000000","message":"this comment should be updated to reflect that it\u0027s not enforced on DELETEs either","commit_id":"a9a7aeff85a184189b6cc6a910023f06c9e87977"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2efec9bc5ee16de3ee42a81cd942e3b91293422d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    match_rule \u003d policy.RuleCheck(\u0027rule\u0027, action)"},{"line_number":155,"context_line":"    resource, is_write \u003d get_resource_and_action(action, pluralized)"},{"line_number":156,"context_line":"    attr_rule_skipped \u003d action_skip_check(action)"},{"line_number":157,"context_line":"    # Attribute-based checks shall not be enforced on GETs"},{"line_number":158,"context_line":"    if is_write and not attr_rule_skipped:"},{"line_number":159,"context_line":"        # assigning to variable with short name for improving readability"},{"line_number":160,"context_line":"        res_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a57f1b5_a4395e43","line":157,"in_reply_to":"3a57f1b5_a5376ae2","updated":"2016-02-11 09:15:25.000000000","message":"Done","commit_id":"a9a7aeff85a184189b6cc6a910023f06c9e87977"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"44d66ba0ba61e90726f11a086ff2f5b625316d3d","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    resource, is_write \u003d get_resource_and_action(action, pluralized)"},{"line_number":157,"context_line":"    attr_rule_skipped \u003d action_skip_check(action)"},{"line_number":158,"context_line":"    # Attribute-based checks shall not be enforced on GETs and DELETEs"},{"line_number":159,"context_line":"    if is_write and not attr_rule_skipped:"},{"line_number":160,"context_line":"        # assigning to variable with short name for improving readability"},{"line_number":161,"context_line":"        res_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"},{"line_number":162,"context_line":"        if resource in res_map:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_c498eb6c","line":159,"updated":"2016-03-10 09:19:47.000000000","message":"I think it might be ok to not enforce checks on delete operations (though not 100% sure yet).\n\nHowever, I\u0027d suggest modifying the logic in get_resource_and_action rather than adding a new method","commit_id":"f40de1c646b9be0840a86915dab42ce1def0f384"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"a504689dd27631d51afa2c0920c8b9d8b3f13681","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    resource, is_write \u003d get_resource_and_action(action, pluralized)"},{"line_number":157,"context_line":"    attr_rule_skipped \u003d action_skip_check(action)"},{"line_number":158,"context_line":"    # Attribute-based checks shall not be enforced on GETs and DELETEs"},{"line_number":159,"context_line":"    if is_write and not attr_rule_skipped:"},{"line_number":160,"context_line":"        # assigning to variable with short name for improving readability"},{"line_number":161,"context_line":"        res_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"},{"line_number":162,"context_line":"        if resource in res_map:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_2a0fa437","line":159,"in_reply_to":"5aef4532_c498eb6c","updated":"2016-03-11 03:08:57.000000000","message":"Done","commit_id":"f40de1c646b9be0840a86915dab42ce1def0f384"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"b1ea8558b18ad075118d89384dc2325b3e10ac97","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    resource, is_write \u003d get_resource_and_action(action, pluralized)"},{"line_number":157,"context_line":"    attr_rule_skipped \u003d action_skip_check(action)"},{"line_number":158,"context_line":"    # Attribute-based checks shall not be enforced on GETs and DELETEs"},{"line_number":159,"context_line":"    if is_write and not attr_rule_skipped:"},{"line_number":160,"context_line":"        # assigning to variable with short name for improving readability"},{"line_number":161,"context_line":"        res_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"},{"line_number":162,"context_line":"        if resource in res_map:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5aef4532_cf5bb284","line":159,"in_reply_to":"5aef4532_c498eb6c","updated":"2016-03-11 02:19:28.000000000","message":"I will consider that.","commit_id":"f40de1c646b9be0840a86915dab42ce1def0f384"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0d5e216bb03cd775344a531331adaf73c2a92e86","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    resource \u003d pluralized or (\"%ss\" % data[-1])"},{"line_number":68,"context_line":"    enforce_attr_based_check \u003d not ("},{"line_number":69,"context_line":"        data[0] \u003d\u003d \u0027get\u0027 or"},{"line_number":70,"context_line":"        (data[0] \u003d\u003d \u0027delete\u0027 and resource \u003d\u003d \u0027ports\u0027))"},{"line_number":71,"context_line":"    return (resource, enforce_attr_based_check)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_c772517c","line":70,"updated":"2016-03-12 01:18:38.000000000","message":"why only ports, does this approach leak information somehow? the policy engine shouldn\u0027t behave differently depending on the type.\n\nIt seems like we should only care about this enforcement on posts and puts.","commit_id":"0927a146d5438ac3c20efa70cb89fbed4f7ec405"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"de4bb827c878eb665834b8568f872621df10e77c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    resource \u003d pluralized or (\"%ss\" % data[-1])"},{"line_number":68,"context_line":"    enforce_attr_based_check \u003d not ("},{"line_number":69,"context_line":"        data[0] \u003d\u003d \u0027get\u0027 or"},{"line_number":70,"context_line":"        (data[0] \u003d\u003d \u0027delete\u0027 and resource \u003d\u003d \u0027ports\u0027))"},{"line_number":71,"context_line":"    return (resource, enforce_attr_based_check)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_d2a59447","line":70,"in_reply_to":"3afc51ec_493c79e2","updated":"2016-03-15 06:48:18.000000000","message":"Yes, we don\u0027t want to create an inconsistency for a particular type of resource.","commit_id":"0927a146d5438ac3c20efa70cb89fbed4f7ec405"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"81fa128a5e3fef6e588d1e44917c0c85246ad25a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    resource \u003d pluralized or (\"%ss\" % data[-1])"},{"line_number":68,"context_line":"    enforce_attr_based_check \u003d not ("},{"line_number":69,"context_line":"        data[0] \u003d\u003d \u0027get\u0027 or"},{"line_number":70,"context_line":"        (data[0] \u003d\u003d \u0027delete\u0027 and resource \u003d\u003d \u0027ports\u0027))"},{"line_number":71,"context_line":"    return (resource, enforce_attr_based_check)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afc51ec_493c79e2","line":70,"in_reply_to":"3afc51ec_c772517c","updated":"2016-03-14 08:06:24.000000000","message":"Hi, Kevin. Thanks for your time to review this.\n\n\"It seems like we should only care about this enforcement on posts and puts.\", do you mean \"deletes and puts\"?\n\nMy previous idea is to just modify what bug in this patch needs. So I didn\u0027t recognize we should take care delete action on other resource too.","commit_id":"0927a146d5438ac3c20efa70cb89fbed4f7ec405"}]}
