Together-100Devs / Together

Together is a group calendar application using the MERN stack intended to bring discord communities closer!
https://together.cyclic.app/
MIT License
167 stars 112 forks source link

Feature/issue #441 #447

Open vguzman812 opened 1 year ago

vguzman812 commented 1 year ago

Description

I have implemented a new property, admin, in the user schema. The property has a type of Number, and a default value of 0. I have also added authentication code to check if the user is an admin. I have added code, which is currently commented out, that only allows the user access to the adminDashboard route if they have an admin property of 1 (I.E. they are an admin). The commented-out authentication code causes failed admin dashboard testing when uncommented due to the mock user not having the admin property. I am unsure if I should flag this PR as requiring an update to testing.

Type of change

Please select everything applicable. Please, do not delete any lines.

Issue

Checklist:

vguzman812 commented 1 year ago

Re Done to have a role field instead of admin field.