)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1aa9fae6630860190b1eaf57c2f7cb058c1f0709","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"soft-delete server like deleted server except they"},{"line_number":10,"context_line":"will keep in system for a while depends on configuration,"},{"line_number":11,"context_line":"we should not allow non-admin user query them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0df0893495cefe11aa64a3a627f928d07d35d448"},{"line_number":14,"context_line":"Closes-Bug: 1526715"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1aa78d24_43c2f885","line":11,"updated":"2016-07-07 17:54:13.000000000","message":"From reviewing this and the related code, I learned that currently a query like:\n\n GET \"http://10.0.2.15:8774/v2.1/servers/detail?status\u003dsoft_deleted\"\n\nalways returns an empty server list, even for admin.\n\nThe reason is because the \u0027soft_deleted\u003dTrue\u0027 search opt is needed for the db api call, otherwise it will filter out soft-deleted servers.\n\nThis query by admin:\n\n GET \"http://10.0.2.15:8774/v2.1/servers/detail?status\u003dsoft_deleted\u0026soft_deleted\u003dTrue\"\n\nis a hack for listing soft-deleted servers. It returns empty list for non-admin because \u0027remove_invalid_options\u0027 removes \u0027soft_deleted\u003dTrue\u0027 for non-admin.","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ac56123fc81f8826777ef799c1669000008780f8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"soft-delete server like deleted server except they"},{"line_number":10,"context_line":"will keep in system for a while depends on configuration,"},{"line_number":11,"context_line":"we should not allow non-admin user query them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0df0893495cefe11aa64a3a627f928d07d35d448"},{"line_number":14,"context_line":"Closes-Bug: 1526715"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ad45d7e_45a3ef4f","line":11,"in_reply_to":"1aa78d24_43c2f885","updated":"2016-08-12 15:28:04.000000000","message":"yeah, this is the db layer code\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2133","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1aa9fae6630860190b1eaf57c2f7cb058c1f0709","unresolved":false,"context_lines":[{"line_number":11,"context_line":"we should not allow non-admin user query them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0df0893495cefe11aa64a3a627f928d07d35d448"},{"line_number":14,"context_line":"Closes-Bug: 1526715"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1aa78d24_e32e8441","line":14,"updated":"2016-07-07 17:54:13.000000000","message":"This patch does more than just address this particular issue. As a side effect it enables the \u0027status\u003dsoft_deleted\u0027 query to work on its own. I think we should at least mention it in the commit message or open another bug about it and Closes-Bug on it too.","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ac56123fc81f8826777ef799c1669000008780f8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"we should not allow non-admin user query them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0df0893495cefe11aa64a3a627f928d07d35d448"},{"line_number":14,"context_line":"Closes-Bug: 1526715"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ad45d7e_65dc3347","line":14,"in_reply_to":"1aa78d24_e32e8441","updated":"2016-08-12 15:28:04.000000000","message":"ok, will update this","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"f1bf391e1bac06bc2356ed19090202e8aa57a4b2","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        if search_opts.get(\"vm_state\") \u003d\u003d [\u0027soft-delete\u0027]:"},{"line_number":345,"context_line":"            if context.is_admin:"},{"line_number":346,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":347,"context_line":"            else:"},{"line_number":348,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":349,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_aedd6ce1","line":347,"range":{"start_line":347,"start_character":16,"end_line":347,"end_character":17},"updated":"2016-01-24 07:37:00.000000000","message":"Would it be wise to add this into Policy file and keep it configurable instead of hard coding that only admin can make this call?","commit_id":"8a8d851bf81dd4cd9715f9507387e0434af4dd3e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"397eb6461281722a8f6d3ada17707ebcf3b9be37","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        if search_opts.get(\"vm_state\") \u003d\u003d [\u0027soft-delete\u0027]:"},{"line_number":345,"context_line":"            if context.is_admin:"},{"line_number":346,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":347,"context_line":"            else:"},{"line_number":348,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":349,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_8f985d6c","line":347,"range":{"start_line":347,"start_character":16,"end_line":347,"end_character":17},"in_reply_to":"7a5de9d1_496825bb","updated":"2016-01-27 10:37:12.000000000","message":"ok, I understand the purpose here,\nI agree this is a reasonable suggestion, just don\u0027t know\nwhether it\u0027s ok to add 2 policy for one action\nso I will dig more here , thanks a lot for the suggestion~","commit_id":"8a8d851bf81dd4cd9715f9507387e0434af4dd3e"},{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"b652e3d621b9ef243b78441f8e5fe4e09949848e","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        if search_opts.get(\"vm_state\") \u003d\u003d [\u0027soft-delete\u0027]:"},{"line_number":345,"context_line":"            if context.is_admin:"},{"line_number":346,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":347,"context_line":"            else:"},{"line_number":348,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":349,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_496825bb","line":347,"range":{"start_line":347,"start_character":16,"end_line":347,"end_character":17},"in_reply_to":"9a68dd71_20b5977d","updated":"2016-01-27 09:54:31.000000000","message":"I am not saying we must do this. The above was just a suggestion. What I said is, since this is related to authorization, it could be made more flexible by adding it to policy file.","commit_id":"8a8d851bf81dd4cd9715f9507387e0434af4dd3e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"b121e57a711a961179e1301cf43f12aa58ba1618","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        if search_opts.get(\"vm_state\") \u003d\u003d [\u0027soft-delete\u0027]:"},{"line_number":345,"context_line":"            if context.is_admin:"},{"line_number":346,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":347,"context_line":"            else:"},{"line_number":348,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":349,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_20b5977d","line":347,"range":{"start_line":347,"start_character":16,"end_line":347,"end_character":17},"in_reply_to":"9a68dd71_aedd6ce1","updated":"2016-01-26 20:23:31.000000000","message":"no, it\u0027s not related to policy file .....\n\nit\u0027s list server , we allow some general user to list the server but we don\u0027t allow them to list \u0027deleted\u0027 servers","commit_id":"8a8d851bf81dd4cd9715f9507387e0434af4dd3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1aa9fae6630860190b1eaf57c2f7cb058c1f0709","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":353,"context_line":"            else:"},{"line_number":354,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":355,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.26\u0027):"},{"line_number":358,"context_line":"            for tag_filter in TAG_SEARCH_FILTERS:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_077b0ec2","line":355,"updated":"2016-07-07 17:54:13.000000000","message":"Initially I thought this code (and the block above it) was unreachable for non-admin because \u0027remove_invalid_options\u0027 would remove the \u0027vm_state\u0027 search opt, but I eventually saw that \"status\" is an allowed search opt that turns it into a \u0027vm_state\u0027 search opt AFTER the remove_valid_options check. How confusing.","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ac56123fc81f8826777ef799c1669000008780f8","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                search_opts[\u0027soft_deleted\u0027] \u003d True"},{"line_number":353,"context_line":"            else:"},{"line_number":354,"context_line":"                msg \u003d _(\"Only administrators may list deleted instances\")"},{"line_number":355,"context_line":"                raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.26\u0027):"},{"line_number":358,"context_line":"            for tag_filter in TAG_SEARCH_FILTERS:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_9218d5d4","line":355,"in_reply_to":"1aa78d24_077b0ec2","updated":"2016-08-12 15:28:04.000000000","message":"added some comments in https://review.openstack.org/#/c/354119/","commit_id":"a0713589ade5a7326567e4cf39a2aa10a6e9bbfe"}]}
