Feat/impersonate users (#2503)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-04-26 14:18:17 +05:30
1 parent 9fffaa20a2
commit 6d5db1cb3a
13 files changed
+285 -34

No files matched your search

+3
View File
@@ -1,3 +1,4 @@
import { UserPermissionRole } from "@prisma/client";
import NextAuth, { DefaultSession } from "next-auth";
declare module "next-auth" {
@@ -5,6 +6,8 @@ declare module "next-auth" {
type CalendsoSessionUser = DefaultSessionUser & {
id: number;
username: string;
impersonatedByUID?: number;
role: UserPermissionRole;
};
/**
* Returned by `useSession`, `getSession` and received as a prop on the `Provider` React Context