-
Notifications
You must be signed in to change notification settings - Fork 16
Description
The admin and maintainer information will be displayed on the admin dashboard. In order to prevent an admin change information of another admin/maintainer freely. We need to add a white list to handle changes on one another. A change will be requested by an admin, and a second admin will verify that change. This feature only works with admin users. It does not apply to maintainers.
There are three reasons:
- A user somehow cannot log in but need another admin to change information (possibly email).
- A user won't be an admin/maintainer anymore that needs another admin to delete their account.
- Change role maintainer to admin, and vice versa
Model name: whitelist-user-change (on the database), WUserChange (in the codebase)
Fields:
- target_user: String ( reference of user _id)
- pair_approval: Array of reference user_id, limit length 2
- created_at Date Immutable
- data: {
first_name: { type: String },
last_name: { type : String },
email: { type: String, validate: email validation }
role: { type: String, enum: ["Admin", "Maintainer"] }
}
We will use mongoose and MongoDB for this issue