Disable Impersonation Option (#2880)
* Disable Impersonation * Update Description Copy Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
e16eee68b0
commit
1bf009f5f5
8 files changed
+117
-48
No files matched your search
@@ -32,6 +32,10 @@ const ImpersonationProvider = CredentialsProvider({
|
||||
throw new Error("This user does not exist");
|
||||
}
|
||||
|
||||
if (user.disableImpersonation) {
|
||||
throw new Error("This user has disabled Impersonation.");
|
||||
}
|
||||
|
||||
// Log impersonations for audit purposes
|
||||
await prisma.impersonations.create({
|
||||
data: {
|
||||
|
||||
Reference in new issue
Block a user