)]}'
{"neutron/db/securitygroups_db.py":[{"author":{"_account_id":3031,"name":"Sam Morrison","email":"sorrison@gmail.com","username":"sorrison"},"change_message_id":"71d856e4d396939b05158f97dfd4a496c0b213fa","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            sorts\u003dsorts, marker\u003dmarker, limit\u003dlimit, page_reverse\u003dpage_reverse)"},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"        if not filters and context.project_id and not context.is_admin:"},{"line_number":723,"context_line":"            rule_ids \u003d sg_obj.SecurityGroupRule.get_security_group_rule_ids("},{"line_number":724,"context_line":"                context.project_id)"},{"line_number":725,"context_line":"            filters \u003d {\u0027id\u0027: rule_ids}"},{"line_number":726,"context_line":""},{"line_number":727,"context_line":"        # NOTE(slaweq): use admin context here to be able to get all rules"},{"line_number":728,"context_line":"        # which fits filters\u0027 criteria. Later in policy engine rules will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_84108df6","line":725,"range":{"start_line":723,"start_character":12,"end_line":725,"end_character":38},"updated":"2020-02-19 21:27:57.000000000","message":"wouldn\u0027t it be simpler to just do:\n\nfilters \u003d {\u0027project_id\u0027: context.project_id}\n\nWould save an additional SQL query","commit_id":"cbb00efbe3c20ea365857bbacd421a1324d2a264"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77ea1c110fafb0f2e4a20bd3d1106a92e2a99def","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            sorts\u003dsorts, marker\u003dmarker, limit\u003dlimit, page_reverse\u003dpage_reverse)"},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"        if not filters and context.project_id and not context.is_admin:"},{"line_number":723,"context_line":"            rule_ids \u003d sg_obj.SecurityGroupRule.get_security_group_rule_ids("},{"line_number":724,"context_line":"                context.project_id)"},{"line_number":725,"context_line":"            filters \u003d {\u0027id\u0027: rule_ids}"},{"line_number":726,"context_line":""},{"line_number":727,"context_line":"        # NOTE(slaweq): use admin context here to be able to get all rules"},{"line_number":728,"context_line":"        # which fits filters\u0027 criteria. Later in policy engine rules will be"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2c5dfb16","line":725,"range":{"start_line":723,"start_character":12,"end_line":725,"end_character":38},"in_reply_to":"3fa7e38b_84108df6","updated":"2020-02-20 09:31:29.000000000","message":"Please review [1]. We need to retrieve:\n- The SG rules belonging to this project_id\n- The SG rules under a SG belonging to this project_id, including those ones created by other projects.\n\nThat means filtering by project_id is not enough.\n\n[1]https://review.opendev.org/#/c/708695/2/neutron/tests/unit/objects/test_securitygroup.py@221","commit_id":"cbb00efbe3c20ea365857bbacd421a1324d2a264"}]}
