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

Functionality to "disable" users and orgs #1127

Open
CarlosNZ opened this issue Oct 29, 2024 · 3 comments
Open

Functionality to "disable" users and orgs #1127

CarlosNZ opened this issue Oct 29, 2024 · 3 comments
Labels
Customer: Fiji Feature: improvement Improvement to existing feature importance: Should have Issue that should be included, not needed in MVP

Comments

@CarlosNZ
Copy link
Collaborator

CarlosNZ commented Oct 29, 2024

It should be possible for users and organisations to be "removed" from the system. But we don't want to actually remove the database entry, as that would also erase their connected applications. Suggestion is to add an "enabled" field to both the user and org tables, which we can set to "false" when disabling a user.

Work required:

  • Update database schema to add "enabled" fields (with default value true)
  • Update login functionality to ignore disabled user/orgs
  • Create form to disable/re-enable users (process TBD)
  • Update data views to exclude disabled user/orgs
  • Update User/Org reg templates to create user on submit, as per this comment
  • Make new build, test

Estimated work 1.5 day (probably less, but probably will require a bit of back-and-forth about the best way to present/filter the data views)

@craigdrown
Copy link

craigdrown commented Oct 29, 2024

and time to convert dashboards etc to only show enabled?

A temp fix: can an admin change the user's password, and also change their email address so they can't password reset?

@CarlosNZ CarlosNZ added Feature: improvement Improvement to existing feature importance: Should have Issue that should be included, not needed in MVP Customer: Fiji labels Oct 29, 2024
@CarlosNZ
Copy link
Collaborator Author

and time to convert dashboards etc to only show enabled?

Most dashboards are applications-based, so wouldn't want to change anything on those ones (historical applications should still show disabled users/orgs). Simple lists of users/orgs are viewed/filtered in the app.

A temp fix: can an admin change the user's password, and also change their email address so they can't password reset?

Sure, but they won't be filtered out of lists of users/orgs.

@CarlosNZ
Copy link
Collaborator Author

CarlosNZ commented Oct 29, 2024

This would also solve a known existing edge case. Currently, if another person signs up with the same username as someone else who's already submitted their application, but hasn't yet verified (i.e. the user won't be created yet), then the 2nd person won't get the "username must be unique" error, but their application will fail once they try to verify (if the other user has verified in the meantime).

The solution to this problem would be to create the user immediately on submission, but in a disabled state, and then when they verify we just set it to "enabled". Then another user wouldn't be able to use the same username at all.

We'd also need to add a scheduled "cleanup" on submission which would delete the user if not verified within the verification timeframe, so as to not pollute the system with a bunch of "dead" usernames that were never fully completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer: Fiji Feature: improvement Improvement to existing feature importance: Should have Issue that should be included, not needed in MVP
Projects
None yet
Development

No branches or pull requests

2 participants