Commit graph

6 commits

Author SHA1 Message Date
Dustin Healy
88abca5d6d fix: allow system role updates when name is unchanged
The updateRoleHandler guard rejected any request where body.name matched
a system role, even when the name was not being changed. This blocked
editing a system role's description. Compare against the URL param to
only reject actual renames to reserved names.
2026-03-26 14:50:57 -07:00
Dustin Healy
f57d90c0d7 fix: address Copilot review findings in admin roles handlers 2026-03-26 14:50:27 -07:00
Dustin Healy
afda763bcd feat: add description field to Role model
- Add description to IRole, CreateRoleRequest, UpdateRoleRequest types
- Add description field to Mongoose roleSchema (default: '')
- Wire description through createRoleHandler and updateRoleHandler
- Include description in listRoles select clause so it appears in list
2026-03-26 14:50:27 -07:00
Dustin Healy
f947546fea fix: rename createRole/deleteRole to avoid AccessRole name collision
The existing accessRole.ts already exports createRole/deleteRole for the
AccessRole model. In createMethods index.ts, these are spread after
roleMethods, overwriting them. Renamed our Role methods to
createRoleByName/deleteRoleByName to match the existing pattern
(getRoleByName, updateRoleByName) and avoid the collision.
2026-03-26 14:50:27 -07:00
Dustin Healy
69093a5d99 fix: address convention violations in admin roles handlers 2026-03-26 14:50:27 -07:00
Dustin Healy
452333ee4d feat: add admin roles handler factory and Express routes 2026-03-26 14:50:27 -07:00