You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we have a super admin that can do task template and study builder editing as well as user management. We want 3 admins total: a super admin that does both, an admin for just study builder component editing, and an admin for just user management. This ticket will be the backend for creating the user management admin.
Add a role field to the userSchema to distinguish between different admin types (for this ticket, just distinguish between super admin and user management admin) in models/user.ts
Modify the isAdmin middleware to enforce permissions based on roles in middleware/auth.ts (like a hasRole)
Update the admin.route.ts for role based permissions. Modify/update existing routes to restrict access based on roles. Super admins can do everything but user admin can only use routes related to access control (adding/removing users)
The text was updated successfully, but these errors were encountered:
arath7
changed the title
Creating a Super Admin - Backend
Backend: creating a user management admin
Jan 20, 2025
Right now, we have a super admin that can do task template and study builder editing as well as user management. We want 3 admins total: a super admin that does both, an admin for just study builder component editing, and an admin for just user management. This ticket will be the backend for creating the user management admin.
The text was updated successfully, but these errors were encountered: