fix: limit self approval to admins
This commit is contained in:
@@ -273,7 +273,7 @@ async function retryPassDelivery(dbQuery: QueryFn, deliveryId: number) {
|
||||
}
|
||||
|
||||
function canSelfApprove(user: UserRow): boolean {
|
||||
return user.roles.includes('ADMIN') || user.roles.includes('SECURITY');
|
||||
return user.roles.includes('ADMIN');
|
||||
}
|
||||
|
||||
async function approveVisit(dbQuery: QueryFn, visitId: number, actor: UserRow, comment: string | null): Promise<VisitRow> {
|
||||
|
||||
Reference in New Issue
Block a user