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

Implement admin ability to enable/disable users #1247

Merged
merged 2 commits into from
Dec 8, 2020

Conversation

janost
Copy link
Contributor

@janost janost commented Nov 30, 2020

Feature request from #246.

This change implements the following:

  • New bool flag on the users table: enabled with default value of true.
  • 2 new admin endpoints:
    • /admin/users/<uuid>/enable
    • /admin/users/<uuid>/disable
  • Check during login if the user is disabled and refuse login
  • Add Disabled badge and enable/disable user links on admin page

@BlackDex
Copy link
Collaborator

I Haven't tested it, but a quick look, and seems oke i think.

@dani-garcia
Copy link
Owner

Okay had to solve the merge conflict but looks good!

@dani-garcia dani-garcia merged commit 6ebc83c into dani-garcia:master Dec 8, 2020
@N1c093
Copy link

N1c093 commented Dec 8, 2020

I don't know if this is the right place to ask my question. I just saw, that this PR was merged some minutes ago.

Will it be possible to use this feature with fail2ban? For example: disable an account for 10 Minutes after 5 wrong login attemps.

@dani-garcia
Copy link
Owner

You could potentially do it yes, but it might be a bit of work, you'd need to first login to get the admin session token, then obtain the user ID, then call the new enable/disable API endpoint.

@janost janost deleted the admin-disable-user branch December 8, 2020 22:15
@BlackDex BlackDex mentioned this pull request Dec 10, 2020
61 tasks
thelittlefireman pushed a commit to thelittlefireman/bitwarden_rs that referenced this pull request Mar 19, 2021
Implement admin ability to enable/disable users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants