feat(2FA): create API routes for admins
This commit is contained in:
1 parent
7c51e1ce4a
commit
ab73667d7b
7 files changed
+129
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user