Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error message when executing ALTER ROLE without ALTER ANY ROLE [CORE6490] #6720

Closed
firebird-automations opened this issue Feb 16, 2021 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

A user executing ALTER ROLE without ALTER ANY ROLE privilege is shown the wrong error message.

Current behaviour:

```
alter role rdb$admin set auto admin mapping;
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-CREATE OR ALTER MAPPING AutoAdminImplementationMapping failed
-Unable to perform operation
-System privilege CHANGE_MAPPING_RULES is missing
```

The error indicates that executing ALTER ROLE was allowed, but only the attempt to then create a mapping fails.

As error message I would expect:

"""
Statement failed, SQLSTATE = 28000
unsuccessful metadata update
-ALTER ROLE RDB$ADMIN failed
-no permission for ALTER access to ROLE RDB$ADMIN
-Effective user is TESTUSER
"""

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

"alter role rdb$admin set/drop auto admin mapping" is deprecated. Mapping control statements should be used instead. In order to keep backward compatibility with old SQL scripts this form is supported, but it's directly translated to mapping control. That's why such diagnostic.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants