feat(2FA): create API routes for admins

This commit is contained in:
Rudy B. committed 2026-04-25 01:40:06 +02:00
1 parent 7c51e1ce4a
commit ab73667d7b
7 files changed
+129 -2

No files matched your search

+8
View File
@@ -35,3 +35,11 @@ export async function canUpdateUser({ user }: Auth, viewedUserId: string) {
export async function canDeleteUser({ user }: Auth) {
return user?.isAdmin ?? false;
}
export async function canEnforceTwoFactorAuthForEveryone({ user }: Auth) {
return user?.isAdmin ?? false;
}
export async function canEnforceTwoFactorAuthForUser({ user }: Auth) {
return user?.isAdmin ?? false;
}