Disable Impersonation Option (#2880)

* Disable Impersonation

* Update Description Copy

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
sean-brydonandPeer Richelsen authored and GitHub committed 2022-05-25 15:21:18 +00:00
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: {