)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a733c1263de1f686857adc0d3a752070f5090745","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Reasons:"},{"line_number":10,"context_line":"- Before revoking the requested access, current code checks whether"},{"line_number":11,"context_line":"  the user has the intended access."},{"line_number":12,"context_line":"- However, if the user does not have the needful access, the service"},{"line_number":13,"context_line":"  prompts the wrong message to user, that database does not exists."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Changes:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da86d52c_7911f802","line":12,"updated":"2015-02-06 16:23:42.000000000","message":"needed, appropriate, desired; not needful ;)","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"}],"trove/common/exception.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"8379b3880aa71d214af1f0d72175fecfd2ba238f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3a961159_474ab4ad","updated":"2015-01-16 20:27:20.000000000","message":"Yeah, I agree with the above comments. I should probably be fixed.","commit_id":"c53915e78b35c6f35d04712f893b504c456162a0"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"cd0268f89bd7d0045cf7290241fa83d649063e00","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":521,"context_line":"    message \u003d _(\"User does not have access on database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5fc49f5f","line":521,"updated":"2015-01-05 18:55:20.000000000","message":"It would probably sound better as \u0027access to database ...\u0027 but not a showstopper","commit_id":"c53915e78b35c6f35d04712f893b504c456162a0"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"b1fb062dccd9d58717e8fffebb24e20275ec1325","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":521,"context_line":"    message \u003d _(\"User does not have access on database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_77ee85b6","line":521,"in_reply_to":"3a961159_304b802c","updated":"2015-01-16 16:50:07.000000000","message":"Looks like we have (a small ;)) consensus.  Could you fix this?","commit_id":"c53915e78b35c6f35d04712f893b504c456162a0"},{"author":{"_account_id":11783,"name":"Shayne Burgess","email":"shayne.burgess@hp.com","username":"shayne-burgess"},"change_message_id":"f7fa3215f99e56de53b232459f4028bd4b42dcc7","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":521,"context_line":"    message \u003d _(\"User does not have access on database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_304b802c","line":521,"in_reply_to":"3a961159_5fc49f5f","updated":"2015-01-05 20:55:01.000000000","message":"Personally I would really like to see this fixed. It\u0027s very simple to change and when serious customers see this type of thing it looks amateur.","commit_id":"c53915e78b35c6f35d04712f893b504c456162a0"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"363120d9c717caa2aab474620bf1a48c475715f5","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                \"Available size: %(disk_size)s GBs.\")"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_8c77639f","line":514,"updated":"2015-02-06 00:59:15.000000000","message":"Why 404 NotFound vs 403 Forbidden? 404 NotFound should only be used for a routing failure (when a URI doesn\u0027t exist).","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"714b2e133a638c470b15bbf1e6bbe5523838f7bf","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                \"Available size: %(disk_size)s GBs.\")"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_fe894e6f","line":514,"in_reply_to":"da86d52c_8c77639f","updated":"2015-02-06 15:49:37.000000000","message":"+1 Even the class itself should probably be renamed to something like \u0027UserDatabaseAccessDenied\u0027 or so...","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"3768e9e5af10704600997bd8e5ad57320bc34926","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                \"Available size: %(disk_size)s GBs.\")"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_d89d7968","line":514,"in_reply_to":"da86d52c_8c77639f","updated":"2015-02-06 19:15:50.000000000","message":"so, its now 403, this is only exception inheritance for parent. and not http-code","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a733c1263de1f686857adc0d3a752070f5090745","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                \"Available size: %(disk_size)s GBs.\")"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_b9929054","line":514,"in_reply_to":"da86d52c_fe894e6f","updated":"2015-02-06 16:23:42.000000000","message":"Is the confusion here that the class and the parent are NotFound because it does appear that the HTTP exception would be 403. see wsgi.py","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"a733c1263de1f686857adc0d3a752070f5090745","unresolved":false,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_b9c7f043","line":515,"updated":"2015-02-06 16:23:42.000000000","message":"So, this message implies that the database %(name)s actually exists. But that cannot be guaranteed, can it? It may in fact be that the database doesn\u0027t exist, yes?","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"3768e9e5af10704600997bd8e5ad57320bc34926","unresolved":false,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"class UserAccessRightsNotFound(NotFound):"},{"line_number":515,"context_line":"    message \u003d _(\"User does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_b877e53a","line":515,"in_reply_to":"da86d52c_b9c7f043","updated":"2015-02-06 19:15:50.000000000","message":"i wud suggest that irrespective of existence of database, fact is that user simply does not have an access on the same.\n\nand the existence of database could be of purpose while granting access, but while revoking the access, its meaningful to know only that user does not have access.\n\ndoes that sounds good.","commit_id":"655680fda3c55484354adc56f1f8d627431ab748"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"fb5e1a2f2a3c993539b78145e1f91843827dddee","unresolved":false,"context_lines":[{"line_number":522,"context_line":""},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"User %(user)s does not have access to database %(name)s.\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa53dc9_902ccbac","line":525,"updated":"2015-04-07 01:58:22.000000000","message":"OK, so as far as I understand, we decided to stick with the MySQL behavior which does not distinguish between the user not having grant for a database and database not being present in the schema. Right? I think it makes sense, just should not we then also throw a similar error message?\n\n\"There is no such grant defined for user \u0027TEST\u0027 on host \u0027%\u0027\"?\n\nI still think the current error message strongly implies the user does not have \u0027access\u0027/\u0027permission\u0027 to do the operation. The MySQL\u0027s version feels much less ambiguous.","commit_id":"23ced34234bf250773b3f273409af8f15f59fb58"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"f5dee417d158e200477263e92ebb2a1bc7e8cccf","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"There is no such grant defined for user \u0027%(user)s\u0027 \""},{"line_number":526,"context_line":"                \"on host \u0027%(host)s\u0027.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_afd50e44","line":526,"updated":"2015-04-07 16:18:35.000000000","message":"I think this message is a little confusing. When we say no such grant in the message, as a user I would expect to see grant you are referring to also mentioned in the error message. From the description in the commit message, it looks like this message is supposed to mean that user doesnt have access to a particular database, is that true? In that case, doesnt it make more sense to specify the database name that the user doesnt have access to instead of the hostname.","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":15090,"name":"Elvis Teixeira","email":"elvis.teixeira@lsbd.ufc.br","username":"ElvisTeixeira"},"change_message_id":"19f9f6727237cbf6cac84ee9cd5b9461f05a047c","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"There is no such grant defined for user \u0027%(user)s\u0027 \""},{"line_number":526,"context_line":"                \"on host \u0027%(host)s\u0027.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aaa499b_eb48a45d","line":526,"in_reply_to":"7aaa499b_b37463fd","updated":"2015-04-13 20:02:27.000000000","message":"Ok, that\u0027s fine","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"21a13b169c39c89036312efeb503cf2ec2799161","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"There is no such grant defined for user \u0027%(user)s\u0027 \""},{"line_number":526,"context_line":"                \"on host \u0027%(host)s\u0027.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_ca884025","line":526,"in_reply_to":"9aa53dc9_afd50e44","updated":"2015-04-07 16:23:50.000000000","message":"This is in similarity to what mysql error reports for a similar action","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":15090,"name":"Elvis Teixeira","email":"elvis.teixeira@lsbd.ufc.br","username":"ElvisTeixeira"},"change_message_id":"a2e460ee6688aa39b8bf413f6f98adbc3a86e37d","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"There is no such grant defined for user \u0027%(user)s\u0027 \""},{"line_number":526,"context_line":"                \"on host \u0027%(host)s\u0027.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_cea018a2","line":526,"in_reply_to":"9aa53dc9_ca884025","updated":"2015-04-09 15:33:02.000000000","message":"Don\u0027t you think ...AccessDenied is a better name than ...AccessNotFound","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"affa8e01cd9a9a254784335ac1f7e3ba2938d442","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"class UserDatabaseAccessNotFound(UnprocessableEntity):"},{"line_number":525,"context_line":"    message \u003d _(\"There is no such grant defined for user \u0027%(user)s\u0027 \""},{"line_number":526,"context_line":"                \"on host \u0027%(host)s\u0027.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aaa499b_b37463fd","line":526,"in_reply_to":"9aa53dc9_cea018a2","updated":"2015-04-13 14:59:16.000000000","message":"Well, the catch is that in this case there is no \u0027Denied Access\u0027. The error is because \u0027grant was not found\u0027 - so, AccessNotFound - or maybe GrantNotFound is more appropriate.","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"}],"trove/extensions/mysql/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"8379b3880aa71d214af1f0d72175fecfd2ba238f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3a961159_27f3e89f","updated":"2015-01-16 20:27:20.000000000","message":"I get the following error message for my Postgres environment: \"ERROR: User does not have access on database db. (HTTP 404)\" I believe the proper HTTP error code would be \"403 Forbidden\".","commit_id":"c53915e78b35c6f35d04712f893b504c456162a0"},{"author":{"_account_id":14009,"name":"Dan Ritchie","email":"dan.ritchie@hp.com","username":"danr"},"change_message_id":"004ff5ee945c80d2c39a8815cd00a8c05e3b50bb","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        databases \u003d [db[\u0027name\u0027] for db in body[\u0027databases\u0027]]"},{"line_number":235,"context_line":"        models.User.grant(context, instance_id, username, hostname, databases)"},{"line_number":236,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def delete(self, req, tenant_id, instance_id, user_id, id):"},{"line_number":239,"context_line":"        \"\"\"Revoke access for a user.\"\"\""},{"line_number":240,"context_line":"        LOG.info(_(\"Revoking user access for instance \u0027%s\u0027\") % instance_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_864e966d","line":237,"updated":"2015-02-11 19:25:10.000000000","message":"Minor, but renaming \"id\" to something more specific would make this clearer, i.e. \"database_name\" or \"db_name\".  All of the other names on this signature are much clearer.","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":14009,"name":"Dan Ritchie","email":"dan.ritchie@hp.com","username":"danr"},"change_message_id":"004ff5ee945c80d2c39a8815cd00a8c05e3b50bb","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def delete(self, req, tenant_id, instance_id, user_id, id):"},{"line_number":239,"context_line":"        \"\"\"Revoke access for a user.\"\"\""},{"line_number":240,"context_line":"        LOG.info(_(\"Revoking user access for instance \u0027%s\u0027\") % instance_id)"},{"line_number":241,"context_line":"        LOG.info(_(\"req : \u0027%s\u0027\\n\\n\") % req)"},{"line_number":242,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":243,"context_line":"        user_id \u003d correct_id_with_req(user_id, req)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_26708a71","line":240,"updated":"2015-02-11 19:25:10.000000000","message":"Minor, can we include user_id we\u0027re revoking access for in log message?","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"92086c7906a1f3bb0353bae3522f7daac31f0160","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        user \u003d self._get_user(context, instance_id, user_id)"},{"line_number":245,"context_line":"        if not user:"},{"line_number":246,"context_line":"            LOG.error(_(\"No such user: %(user)s \") % {\u0027user\u0027: user})"},{"line_number":247,"context_line":"            raise exception.UserNotFound(uuid\u003duser)"},{"line_number":248,"context_line":"        username, hostname \u003d unquote_user_host(user_id)"},{"line_number":249,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":250,"context_line":"        databases \u003d [db.name for db in access.databases]"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_62834556","line":247,"updated":"2015-02-11 22:42:07.000000000","message":"#Add call to get all databases and check the input id against that first\nPrototype code below:\n\nall_database_names \u003d get_all_database_names(instance_id)\nif id not in all_database_names:\n   raise exception.DatabaseNotFound(uuid\u003did)","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":14009,"name":"Dan Ritchie","email":"dan.ritchie@hp.com","username":"danr"},"change_message_id":"004ff5ee945c80d2c39a8815cd00a8c05e3b50bb","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            raise exception.UserNotFound(uuid\u003duser)"},{"line_number":248,"context_line":"        username, hostname \u003d unquote_user_host(user_id)"},{"line_number":249,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":250,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":251,"context_line":"        if id not in databases:"},{"line_number":252,"context_line":"            raise exception.UserDatabaseAccessForbidden(name\u003did)"},{"line_number":253,"context_line":"        models.User.revoke(context, instance_id, username, hostname, id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_a60aba87","line":250,"updated":"2015-02-11 19:25:10.000000000","message":"Minor again, but this would be more clearly named \"database_names\" or \"db_names\"","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":14009,"name":"Dan Ritchie","email":"dan.ritchie@hp.com","username":"danr"},"change_message_id":"004ff5ee945c80d2c39a8815cd00a8c05e3b50bb","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":250,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":251,"context_line":"        if id not in databases:"},{"line_number":252,"context_line":"            raise exception.UserDatabaseAccessForbidden(name\u003did)"},{"line_number":253,"context_line":"        models.User.revoke(context, instance_id, username, hostname, id)"},{"line_number":254,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_698a5365","line":252,"updated":"2015-02-11 19:25:10.000000000","message":"I agree this is confusing.  This error message could imply that user1, who is trying to revoke access from user2 (id\u0027d by user_id), does not have access, when actually it is user2 who already does not have access.\n\nSo I see 2 issues:\n\n1) Where are we verifying that the database exists regardless of whether it exists in the user being revoked\u0027s access list (i.e., db not found error)\n\n2) This message should say something along the lines of \"User xxx does not have access to database yyy, revoking access is not necessary\".","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":13355,"name":"Edmond Kotowski","email":"ekotowski@gmail.com","username":"ekotowski"},"change_message_id":"92086c7906a1f3bb0353bae3522f7daac31f0160","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":250,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":251,"context_line":"        if id not in databases:"},{"line_number":252,"context_line":"            raise exception.UserDatabaseAccessForbidden(name\u003did)"},{"line_number":253,"context_line":"        models.User.revoke(context, instance_id, username, hostname, id)"},{"line_number":254,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_02944989","line":252,"in_reply_to":"da86d52c_5d99c977","updated":"2015-02-11 22:42:07.000000000","message":"Agreed, just returning logging and return wsgi.Result(None, 202) would be best here, or if we have to throw an exception raise 422 Unprocessable Entity with message \"{user} doesn\u0027t have access to this database\".format(user\u003duser_id)","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"f8c4e9d59c40dc033b20707a765991b63f87e2b4","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":250,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":251,"context_line":"        if id not in databases:"},{"line_number":252,"context_line":"            raise exception.UserDatabaseAccessForbidden(name\u003did)"},{"line_number":253,"context_line":"        models.User.revoke(context, instance_id, username, hostname, id)"},{"line_number":254,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_5d99c977","line":252,"in_reply_to":"da86d52c_698a5365","updated":"2015-02-11 21:15:34.000000000","message":"Amrith is completely correct (from patchset 4).  Here\u0027s the results I now get from this command:\n\n  ubuntu@peterdev:~$ trove user-revoke-access myinst peter dbdoesnotexist\n  ERROR: User does not have access to database dbdoesnotexist. (HTTP 403)\n\n  ubuntu@peterdev:~$ trove user-revoke-access myinst peter noaccessdb\n  ERROR: User does not have access to database noaccessdb. (HTTP 403)\n\nThe problem is still there, it\u0027s just now reversed.\n\nIn addition, I think the message (if the database does exist) should be something like what Dan Ritchie says above - and not an error - or it should just be ignored silently with a log message (my preference is to ignore it completely and just log the no-op).","commit_id":"3d2e87ed7b5ef6cfba0ae9ab826ddace1cd40d0d"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"b9e6914637e95301cc25cf961aec23dd460a5ca6","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        access \u003d models.User.access(context, instance_id, username, hostname)"},{"line_number":252,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":253,"context_line":"        if id not in databases:"},{"line_number":254,"context_line":"            raise exception.UserDatabaseAccessNotFound(user\u003duser_id, name\u003did)"},{"line_number":255,"context_line":"        models.User.revoke(context, instance_id, username, hostname, id)"},{"line_number":256,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_67fe733a","line":254,"updated":"2015-02-27 21:59:22.000000000","message":"I agree with Dan Ritchie here.  On first read, it looks like this is an error (it\u0027s not, because id is really a name, but that makes it confusing)","commit_id":"bfda28bba4a4ba7b3e7790536938d9b7d724dd8d"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"26c4c74aa856fd18073a5354718bd2212b38586d","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def delete(self, req, tenant_id, instance_id, user_id, id):"},{"line_number":239,"context_line":"        \"\"\"Revoke access for a user.\"\"\""},{"line_number":240,"context_line":"        database_to_be_revoked \u003d id"},{"line_number":241,"context_line":"        LOG.info(_(\"Revoking access for user: %(user)s on \""},{"line_number":242,"context_line":"                   \"instance: %(instance)s.\") % {\u0027user\u0027: user_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_e0bad309","line":239,"updated":"2015-04-05 02:10:38.000000000","message":"could have as well just rename the parameter.","commit_id":"23ced34234bf250773b3f273409af8f15f59fb58"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"5f0b1cbab396dcad68105f8df189f65bdc07d927","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def delete(self, req, tenant_id, instance_id, user_id, id):"},{"line_number":239,"context_line":"        \"\"\"Revoke access for a user.\"\"\""},{"line_number":240,"context_line":"        database_to_be_revoked \u003d id"},{"line_number":241,"context_line":"        LOG.info(_(\"Revoking access for user: %(user)s on \""},{"line_number":242,"context_line":"                   \"instance: %(instance)s.\") % {\u0027user\u0027: user_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_60a36350","line":239,"in_reply_to":"baa041b7_e0bad309","updated":"2015-04-05 03:59:12.000000000","message":"Well the parameter name is needed to be id since that is being used from the serivce url and controller.","commit_id":"23ced34234bf250773b3f273409af8f15f59fb58"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"f5dee417d158e200477263e92ebb2a1bc7e8cccf","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        database_to_be_revoked \u003d id"},{"line_number":241,"context_line":"        LOG.info(_(\"Revoking access for user: %(user)s on \""},{"line_number":242,"context_line":"                   \"instance: %(instance)s.\") % {\u0027user\u0027: user_id,"},{"line_number":243,"context_line":"                                                 \u0027instance\u0027: instance_id})"},{"line_number":244,"context_line":"        LOG.info(_(\"req : \u0027%s\u0027\\n\\n\") % req)"},{"line_number":245,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":246,"context_line":"        user_id \u003d correct_id_with_req(user_id, req)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_ef73164c","line":243,"updated":"2015-04-07 16:18:35.000000000","message":"How about mentioning the database for which we are revoking access?","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"21a13b169c39c89036312efeb503cf2ec2799161","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        database_to_be_revoked \u003d id"},{"line_number":241,"context_line":"        LOG.info(_(\"Revoking access for user: %(user)s on \""},{"line_number":242,"context_line":"                   \"instance: %(instance)s.\") % {\u0027user\u0027: user_id,"},{"line_number":243,"context_line":"                                                 \u0027instance\u0027: instance_id})"},{"line_number":244,"context_line":"        LOG.info(_(\"req : \u0027%s\u0027\\n\\n\") % req)"},{"line_number":245,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":246,"context_line":"        user_id \u003d correct_id_with_req(user_id, req)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_8a991871","line":243,"in_reply_to":"9aa53dc9_ef73164c","updated":"2015-04-07 16:23:50.000000000","message":"I can take that","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"f5dee417d158e200477263e92ebb2a1bc7e8cccf","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":254,"context_line":"        if database_to_be_revoked not in databases:"},{"line_number":255,"context_line":"            raise exception.UserDatabaseAccessNotFound("},{"line_number":256,"context_line":"                user\u003dusername, host\u003dhostname)"},{"line_number":257,"context_line":"        models.User.revoke(context, instance_id, username, hostname,"},{"line_number":258,"context_line":"                           database_to_be_revoked)"},{"line_number":259,"context_line":"        return wsgi.Result(None, 202)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_6f3a6638","line":256,"updated":"2015-04-07 16:18:35.000000000","message":"how about mentioning the database for which user doesnt have access to revoke in addition to the hostname?","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"21a13b169c39c89036312efeb503cf2ec2799161","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        databases \u003d [db.name for db in access.databases]"},{"line_number":254,"context_line":"        if database_to_be_revoked not in databases:"},{"line_number":255,"context_line":"            raise exception.UserDatabaseAccessNotFound("},{"line_number":256,"context_line":"                user\u003dusername, host\u003dhostname)"},{"line_number":257,"context_line":"        models.User.revoke(context, instance_id, username, hostname,"},{"line_number":258,"context_line":"                           database_to_be_revoked)"},{"line_number":259,"context_line":"        return wsgi.Result(None, 202)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_8ab0f8de","line":256,"in_reply_to":"9aa53dc9_6f3a6638","updated":"2015-04-07 16:23:50.000000000","message":"So, the current exception message is as per what mysql itself reports","commit_id":"15b512a34e818ca64748adb06d8c7ee84d487859"}]}
