Commit Graph

12 Commits

Author SHA1 Message Date
hykocx 0d6b06f217 feat(users): allow system roles to be renamed but not have permissions changed
- update `updateRole` to allow name changes for system roles while blocking permission updates
- remove edit button restriction for system roles in roles page
- disable name field only was replaced by disabling permissions checkboxes for system roles in edit modal
- update README to reflect new system role update policy
2026-04-25 10:02:51 -04:00
hykocx 826ce3dcd1 fix(auth): prevent system roles from being updated
- throw error in updateRole when role is system-protected
- hide edit button in roles table for system roles
- update README to reflect roles cannot be modified (not just renamed)
2026-04-25 09:59:33 -04:00
hykocx c959b16db5 refactor(api): add granular permission enforcement on admin routes
- add optional `permission` field to route definitions with type validation in `define.js`
- check `hasPermission()` in router after `requireAdmin()` and return 403 if denied
- document `permission` and `skipRateLimit` optional fields in api README
- load user permissions in `AdminPage.server.js` and pass them to client via `user` prop
- use `user.permissions` in `RolesPage` and `UsersPage` to conditionally render actions
- expose permission-gated API routes in `auth/api.js`
2026-04-25 09:21:07 -04:00
hykocx 18f1fcdbd0 style(ui): change default button size from sm to md and remove explicit size="sm" props 2026-04-22 19:45:56 -04:00
hykocx 9ca3e0a83b refactor(admin): pass icon components as references instead of JSX elements 2026-04-22 19:40:28 -04:00
hykocx e2dd60843f style(ui): add icon-only button sizing and fix action column alignment 2026-04-22 19:38:02 -04:00
hykocx 0fd01d2b68 fix(ui): add right alignment support for table columns using align prop 2026-04-22 19:35:39 -04:00
hykocx fa40565686 refactor(admin): migrate page titles from static map to self-registering pages 2026-04-22 17:46:53 -04:00
hykocx f54b2640ad refactor(admin): replace parameterized routes with modal-based editing for users and roles 2026-04-22 16:15:43 -04:00
hykocx fe4ca228cc refactor(admin): simplify AdminHeader component by removing inline logic 2026-04-22 15:36:48 -04:00
hykocx 96c8352dcf refactor(ui): move system badge to dedicated column and update Badge styles 2026-04-22 15:02:10 -04:00
hykocx 61388f04a6 refactor: reorganize feature modules with consistent naming conventions and flattened structure 2026-04-22 14:12:15 -04:00