Skip to content

RBAC: add default role to user #6843

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

Closed
Tracked by #6824
flaneur2020 opened this issue Jul 27, 2022 · 0 comments · Fixed by #6847
Closed
Tracked by #6824

RBAC: add default role to user #6843

flaneur2020 opened this issue Jul 27, 2022 · 0 comments · Fixed by #6847
Labels
C-feature Category: feature

Comments

@flaneur2020
Copy link
Member

flaneur2020 commented Jul 27, 2022

Summary

an user can set up a default role with the statement:

ALTER USER ... WITH DEFAULT_ROLE = '<role>';

also the default role can be viewed in the SHOW USERS statement.

on setting a default role, the role MUST be one of the roles the user has been granted.

on an user connecting to databend-query, she'd get set the default role to the current role in the session (with a check about whether the user still has the role).

on revoking an role from the user, if the role is set as default role, the default role would be reset to None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants