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.
This commit is contained in:
Dustin Healy 2026-03-25 08:56:38 -07:00
parent 69093a5d99
commit f947546fea
3 changed files with 12 additions and 12 deletions

View file

@ -14,10 +14,10 @@ const requireManageRoles = requireCapability(SystemCapabilities.MANAGE_ROLES);
const handlers = createAdminRolesHandlers({
listRoles: db.listRoles,
getRoleByName: db.getRoleByName,
createRole: db.createRole,
createRoleByName: db.createRoleByName,
updateRoleByName: db.updateRoleByName,
updateAccessPermissions: db.updateAccessPermissions,
deleteRole: db.deleteRole,
deleteRoleByName: db.deleteRoleByName,
findUser: db.findUser,
updateUser: db.updateUser,
listUsersByRole: db.listUsersByRole,