)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"9367ae1af6bc31bc541edde56d94b8d2d0764179","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c5361030_50198609","updated":"2024-12-18 01:25:30.000000000","message":"hi, Kiran Pawar. please see my comment.","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":36180,"name":"Gireesh Awasthi","display_name":"Gireesh","email":"gawasthi2010@gmail.com","username":"agireesh","status":"NetApp"},"change_message_id":"cb0da4caecf20d00ee8064dc570c1b89b140a415","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e306ef5f_0f11cb87","updated":"2024-12-20 06:57:14.000000000","message":"LGTM ..!","commit_id":"22ccfe999cfd52d41013cd29cb85ec2f3c44ee4a"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"04edf9f1bfd55f252586e0f748b9f87bfc129162","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a744b8d8_fd8e3d59","updated":"2024-12-19 01:23:40.000000000","message":"LGTM, thanks.","commit_id":"22ccfe999cfd52d41013cd29cb85ec2f3c44ee4a"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"daa6cf16aa610b0e13ca17e2b4324c791029dfdd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8d7a2ae0_fa9c95a1","updated":"2024-12-20 18:52:05.000000000","message":"Looks good, thanks for working on this change. Please address the comments in a follow-up change.","commit_id":"22ccfe999cfd52d41013cd29cb85ec2f3c44ee4a"}],"manila/share/api.py":[{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"b516c402b2b6d226e6564fed09b567beb4d3a8be","unresolved":true,"context_lines":[{"line_number":2361,"context_line":"        if all_tenants:"},{"line_number":2362,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2363,"context_line":"                context, \u0027share\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2364,"context_line":"            if list_all_projects:"},{"line_number":2365,"context_line":"                filters.pop(\u0027project_id\u0027, None)"},{"line_number":2366,"context_line":""},{"line_number":2367,"context_line":"        # Get filtered list of shares"},{"line_number":2368,"context_line":"        if \u0027host\u0027 in filters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"839628b6_99e87d28","line":2365,"range":{"start_line":2364,"start_character":12,"end_line":2365,"end_character":47},"updated":"2024-12-03 02:36:55.000000000","message":"don\u0027t need to pop \u0027project_id\u0027 from filters. \nFor example, as an administrator, in addition to seeing shares under all projects, I would also want to see shares under project A or project B.","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"9367ae1af6bc31bc541edde56d94b8d2d0764179","unresolved":true,"context_lines":[{"line_number":2361,"context_line":"        if all_tenants:"},{"line_number":2362,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2363,"context_line":"                context, \u0027share\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2364,"context_line":"            if list_all_projects:"},{"line_number":2365,"context_line":"                filters.pop(\u0027project_id\u0027, None)"},{"line_number":2366,"context_line":""},{"line_number":2367,"context_line":"        # Get filtered list of shares"},{"line_number":2368,"context_line":"        if \u0027host\u0027 in filters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9353fdaf_2a7212f8","line":2365,"range":{"start_line":2364,"start_character":12,"end_line":2365,"end_character":47},"in_reply_to":"1bcfaf27_7d567daf","updated":"2024-12-18 01:25:30.000000000","message":"user user_a is an admin user and in project A.  user user_b is a no admin user and in project B.\nThere are the following usage scenarios:\n1: user_a want to get all shares in all project.\n   GET /v2/shares?all_tenants\u003dtrue\n2: user_a want to get shares in project A.\n   GET /v2/shares\n3: user_a want to only get shares in project B.\n   GET /v2/shares?all_tenants\u003dtrue\u0026project_id\u003d{project_B_uuid}\n4: user_b can only get shares in project B.\n   GET /v2/shares?\n   \nif we pop project_id from filters, How is the third scenario implemented?\nall_tenants\u003dtrue\u0026project_id\u003d{project_B_uuid} means the admin user still obtains the shares of all projects, but filters the project_id for these shares.","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"d0dfefbe05b167cf29a3ea504c0de7442d703289","unresolved":true,"context_lines":[{"line_number":2361,"context_line":"        if all_tenants:"},{"line_number":2362,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2363,"context_line":"                context, \u0027share\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2364,"context_line":"            if list_all_projects:"},{"line_number":2365,"context_line":"                filters.pop(\u0027project_id\u0027, None)"},{"line_number":2366,"context_line":""},{"line_number":2367,"context_line":"        # Get filtered list of shares"},{"line_number":2368,"context_line":"        if \u0027host\u0027 in filters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1bcfaf27_7d567daf","line":2365,"range":{"start_line":2364,"start_character":12,"end_line":2365,"end_character":47},"in_reply_to":"839628b6_99e87d28","updated":"2024-12-03 09:50:47.000000000","message":"this pop operation is done only when query is specified with all_tenants. If query is specified with all tenants that means certainly admin is not looking for project A or project B. For that scenario, he can specify project_id and hence we wont check for \u0027list_all_projects\u0027 policy which follow path e.g. else part at line 2471.\n\nwdyt ?","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3511c99123ac64918a2ff87d02bad618c038602e","unresolved":false,"context_lines":[{"line_number":2361,"context_line":"        if all_tenants:"},{"line_number":2362,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2363,"context_line":"                context, \u0027share\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2364,"context_line":"            if list_all_projects:"},{"line_number":2365,"context_line":"                filters.pop(\u0027project_id\u0027, None)"},{"line_number":2366,"context_line":""},{"line_number":2367,"context_line":"        # Get filtered list of shares"},{"line_number":2368,"context_line":"        if \u0027host\u0027 in filters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"276f8baa_e5dd0637","line":2365,"range":{"start_line":2364,"start_character":12,"end_line":2365,"end_character":47},"in_reply_to":"9353fdaf_2a7212f8","updated":"2024-12-18 15:59:50.000000000","message":"got it. I was under assumption if someone has rights to see all projects why would he/she provide specific project_id in query. Updated.","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"b516c402b2b6d226e6564fed09b567beb4d3a8be","unresolved":true,"context_lines":[{"line_number":2434,"context_line":"            search_opts.pop(\u0027all_tenants\u0027, None)"},{"line_number":2435,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2436,"context_line":"                context, \u0027share_snapshot\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2437,"context_line":"            if list_all_projects:"},{"line_number":2438,"context_line":"                search_opts.pop(\u0027project_id\u0027, None)"},{"line_number":2439,"context_line":""},{"line_number":2440,"context_line":"        string_args \u003d {\u0027sort_key\u0027: sort_key, \u0027sort_dir\u0027: sort_dir}"},{"line_number":2441,"context_line":"        string_args.update(search_opts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5e1c7690_80d9d2e6","line":2438,"range":{"start_line":2437,"start_character":12,"end_line":2438,"end_character":51},"updated":"2024-12-03 02:36:55.000000000","message":"same above.","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":32919,"name":"kiran pawar","display_name":"Kiran Pawar","email":"kinpaa@gmail.com","username":"kpdev"},"change_message_id":"3511c99123ac64918a2ff87d02bad618c038602e","unresolved":false,"context_lines":[{"line_number":2434,"context_line":"            search_opts.pop(\u0027all_tenants\u0027, None)"},{"line_number":2435,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2436,"context_line":"                context, \u0027share_snapshot\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2437,"context_line":"            if list_all_projects:"},{"line_number":2438,"context_line":"                search_opts.pop(\u0027project_id\u0027, None)"},{"line_number":2439,"context_line":""},{"line_number":2440,"context_line":"        string_args \u003d {\u0027sort_key\u0027: sort_key, \u0027sort_dir\u0027: sort_dir}"},{"line_number":2441,"context_line":"        string_args.update(search_opts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"43549253_128d0c5b","line":2438,"range":{"start_line":2437,"start_character":12,"end_line":2438,"end_character":51},"in_reply_to":"5e1c7690_80d9d2e6","updated":"2024-12-18 15:59:50.000000000","message":"Done","commit_id":"4372f3110ead9cac67a2b1034d23583af6091c0f"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"daa6cf16aa610b0e13ca17e2b4324c791029dfdd","unresolved":true,"context_lines":[{"line_number":2357,"context_line":"            filters[\u0027list_deferred_delete\u0027] \u003d True"},{"line_number":2358,"context_line":""},{"line_number":2359,"context_line":"        list_all_projects \u003d False"},{"line_number":2360,"context_line":"        all_tenants \u003d utils.is_all_tenants(search_opts)"},{"line_number":2361,"context_line":"        if all_tenants:"},{"line_number":2362,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2363,"context_line":"                context, \u0027share\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"},{"line_number":2364,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df66de82_0325c794","line":2361,"range":{"start_line":2360,"start_character":8,"end_line":2361,"end_character":22},"updated":"2024-12-20 18:52:05.000000000","message":"```suggestion\n        if utils.is_all_tenants(search_opts):\n```\nMaybe we can use something like ^ ?\nall_tenants is never being used elsewhere, so we can avoid it","commit_id":"22ccfe999cfd52d41013cd29cb85ec2f3c44ee4a"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"daa6cf16aa610b0e13ca17e2b4324c791029dfdd","unresolved":true,"context_lines":[{"line_number":2427,"context_line":""},{"line_number":2428,"context_line":"        # Read and remove key \u0027all_tenants\u0027 if was provided"},{"line_number":2429,"context_line":"        list_all_projects \u003d False"},{"line_number":2430,"context_line":"        all_tenants \u003d utils.is_all_tenants(search_opts)"},{"line_number":2431,"context_line":"        if all_tenants:"},{"line_number":2432,"context_line":"            search_opts.pop(\u0027all_tenants\u0027, None)"},{"line_number":2433,"context_line":"            list_all_projects \u003d policy.check_policy("},{"line_number":2434,"context_line":"                context, \u0027share_snapshot\u0027, \u0027list_all_projects\u0027, do_raise\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"623c40ec_973422bf","line":2431,"range":{"start_line":2430,"start_character":8,"end_line":2431,"end_character":23},"updated":"2024-12-20 18:52:05.000000000","message":"same as above","commit_id":"22ccfe999cfd52d41013cd29cb85ec2f3c44ee4a"}]}
