Open mvhutz opened 1 day ago
First, add role parameter to mongo schema:
role
0: banned 1: anonymous user 2: regular user 3: moderator 4: admin
For any endpoint now, change it so:
For all protected API endpoints, do the above to ensure only authorized people can access these endpoints.
First, add
role
parameter to mongo schema:0: banned 1: anonymous user 2: regular user 3: moderator 4: admin
For any endpoint now, change it so:
For all protected API endpoints, do the above to ensure only authorized people can access these endpoints.