-
Notifications
You must be signed in to change notification settings - Fork 3
User Roles & Permissions
nmpaul17 edited this page May 5, 2025
·
2 revisions
User roles are assigned upon account creation or by an admin through the user management system.
Roles determine access to features such as viewing, editing, adding, or deleting records.
Permissions are enforced on both the frontend (for hiding UI elements) and backend (for API protection).
- Full access to all features and settings
- Can manage users and assign roles
- Can perform all Admin and Editor actions
- Can add, edit, and delete donors, donations, and grants
- Can view and manage user invitations
- Cannot assign roles to other users
- Can add and edit records (donors, donations, grants)
- Cannot delete records or manage users
- Read-only access to donor and grant data
- Cannot add, edit, or delete anything
- Best for auditing or observation
- User object includes
roledata after login - UI elements (e.g., "Add" buttons, "Edit" modals) are conditionally shown based on role
- API endpoints verify roles before executing sensitive actions
- Some role checks are still in progress β tracked as GitHub issues
-
server/api/users/β role assignment and updates -
middleware/auth.tsβ route protection - Pages with restricted actions:
/donors/donations/grants/users
- Roles are currently static, defined per user record
- Consider abstracting role checks into a reusable composable or helper function
- Future improvement: define roles as enums/constants in a shared
roles.config.ts - A full role-permission matrix could be implemented for flexibility
-
π Setup
-
π§ Data Model
-
βοΈ Workflows
-
π Access & Support