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

Backend - White List Model - User Manage User #124

Open
minhngo3818 opened this issue Nov 22, 2022 · 0 comments
Open

Backend - White List Model - User Manage User #124

minhngo3818 opened this issue Nov 22, 2022 · 0 comments
Labels
Backend task relates to backend Data Model data model tasks MongoDB

Comments

@minhngo3818
Copy link
Collaborator

minhngo3818 commented Nov 22, 2022

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

@minhngo3818 minhngo3818 added Backend task relates to backend MongoDB Data Model data model tasks labels Nov 22, 2022
@minhngo3818 minhngo3818 changed the title White List Model - User Manage User Backend - White List Model - User Manage User Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend task relates to backend Data Model data model tasks MongoDB
Projects
None yet
Development

No branches or pull requests

1 participant