hagopj13 / hagopj13/node-express-boilerplate

How will the admin update the isEmailVerified or roles fields in the user table

Open
#210 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

How will the admin update the isEmailVerified or roles fields in the user table

Can someone please suggest a approach for the same

One way is to modify the update user validation
If we add roles and email verified fields to update user validation that will give access to the user itself to the email verified and roles fields which is not what is desired

Another approach is to create a separate API but that will lead to a lots of APIs if we keep on adding different roles which has different access to different fields

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing update-user validation and the user API described in the issue. Determine how administrator-only changes to isEmailVerified and roles should be separated from ordinary user updates, then verify that the chosen approach prevents users from changing those fields themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, mongodb, nodejs
Domain
api, authentication, authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.