generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
complexity: mediumfeature: Databasep-feature: User PermissionsFeature includes how user access levels / user permissions will be implemented in the productFeature includes how user access levels / user permissions will be implemented in the productp-feature: Users Listrole: Back Endrole: Front Endsize: 3ptCan be done in 13-18 hoursCan be done in 13-18 hours
Milestone
Description
Overview
Right now the only avenue to promote a user to admin level is to ping someone with DB access and have them promote the account. Not ideal.
Action Items
The EditUser accessible by an admin needs the ability to promote and demote admins. Here's the short list:
PR Needs
- Promote a user to an admin
- Remove a user's admin status
- Remove self admin status
This will require both front end and back end edits
Front end edits:
- Create AdminStatus component rendered on the EditUsers page
- Displays text: "VRMS Admin" and toggle component.
// client/src/components/user-admin/EditUsers.js
<FormGroup>
<FormControlLabel control={<Switch checked={isActive} />} onClick={() => handleSetIsActive()} />
</FormGroup>- Create function within UserApiService:
- UpdateUserAdminStatus
This function edits the user's admin statusand stores the the user id_idof the admin that promoted them.
- UpdateUserAdminStatus
Back end edits:
-
updateuser.model.jsto have anadminPromotedByproperty of typestring - apply the update to the user model to across the db
Resources
This task is fairly similar to #1452 , so feel free to use that PR's code as a model for how to do this PR.
- This issue is part of this epic: Epic - User Permission Search #1737
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
complexity: mediumfeature: Databasep-feature: User PermissionsFeature includes how user access levels / user permissions will be implemented in the productFeature includes how user access levels / user permissions will be implemented in the productp-feature: Users Listrole: Back Endrole: Front Endsize: 3ptCan be done in 13-18 hoursCan be done in 13-18 hours
Type
Projects
Status
Final QA (product)