Allow admins to manage user passwords
This commit is contained in:
@@ -23,6 +23,7 @@ const canUpdateUser = (actor, targetUser) => {
|
||||
const canManageUserStatus = (actor) => actor.role === 'super_admin' || actor.role === 'admin';
|
||||
const canChangeUserEmail = (actor, targetUser) => actor.id === targetUser.id || actor.role === 'super_admin' || actor.role === 'admin';
|
||||
const canManageUserRoleOrTeam = (actor) => actor.role === 'super_admin' || actor.role === 'admin';
|
||||
const canManageUserPassword = (actor) => actor.role === 'super_admin' || actor.role === 'admin';
|
||||
|
||||
const canReadAttendance = (actor, attendance) => {
|
||||
if (!actor || !attendance || !sameTenant(actor, attendance)) return false;
|
||||
@@ -38,5 +39,6 @@ module.exports = {
|
||||
canManageUserStatus,
|
||||
canChangeUserEmail,
|
||||
canManageUserRoleOrTeam,
|
||||
canManageUserPassword,
|
||||
canReadAttendance,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user