-
Notifications
You must be signed in to change notification settings - Fork 763
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
feat(query): add user option: disabled #15249
Conversation
If you specify DISABLED = TRUE for a user: The user cannot log in again. ```sql -- u1 can not login create user u1 identified by '123' with disabled=true; -- u2 can not login alter user u2 with disabled=true; $ bendsql -uu2 -pabc123; Welcome to BendSQL 0.12.4-unknown. Connecting to localhost:8000 as user u2. Error: APIError: RequestError: Start Query failed with status 401 Unauthorized: {"error":{"code":"401","message":"AuthenticateFailure: user u2 is disabled. Not allowed to login"}} ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 17 of 19 files at r1, all commit messages.
Reviewable status: 17 of 19 files reviewed, all discussions resolved (waiting on @b41sh and @flaneur2020)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 19 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @flaneur2020 and @TCeason)
This is not a big deal but in general, I'd suggest to use |
I got you. But this option mainly used to disable user login. So disable is directly. If use enable, user wants to disable will write enable=false. |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
If specify DISABLED = TRUE for a user:
The user cannot log in again.
Note
If a period of time passes, need to re-enable the user:
Tests
Type of change
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)