VigneshDevHub / CampX

"CampX: Discover and share the best campgrounds across Globe, where adventure meets community."
https://campx-1.onrender.com/
MIT License
39 stars 69 forks source link

[FEATURE]Idea flow related to Adding Admin feature #5 #15

Closed preranah7 closed 1 month ago

preranah7 commented 1 month ago

Hi ,I am interested in solving this issue. Here what we can do is edit the user model containing email and role. Role can have two values : user and admin. (The roles will not get asked during the signup form filling, default value will be user) To make the role as admin, the maintainer/admin of the site should be the first to register/signup Through mongoose it is possible and I would like contributing to implement this logic, if there is a single maintainer/admin. While authorizing, we can give the user who owns the camp information card and user with role : admin ,access for edit and delete buttons. Kindly let me know if there are multiple admins/maintainers. Thankyou. Issue #5

preranah7 commented 1 month ago

Closing this as it's a duplicate of #14.