mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-04 21:21:54 +02:00
Implement a full permissions system replacing simple admin/user roles: Backend: - Add Group model with many-to-many user relationship - Add 50+ granular permissions (resource:action pattern) - Create default groups: Administrators, Operators, Viewers - Add permission-checking dependencies for route protection - Add groups API endpoints (CRUD, user assignment) - Add change password endpoint for users - Update backup/restore to include groups - Migrate existing users to groups on startup Frontend: - Add GroupsPage for managing groups and permissions - Add permission helpers to AuthContext (hasPermission, hasAnyPermission) - Add PermissionRoute component for protected routes - Disable buttons/features based on permissions (with tooltips) - Add change password modal in sidebar for all users - Add forgot password info modal on login page - Show user groups in UsersPage with group assignment Testing: - Add integration tests for groups API - Add tests for user-group assignments - Add tests for change password endpoint - Seed default groups in test fixtures Closes #28 #161