I added functioonality to the notifications
This commit is contained in:
+7
-2
@@ -157,8 +157,13 @@ export async function isAccountLocked(user: {
|
||||
|
||||
export function mapDbUserToSessionUser(dbUser: Record<string, unknown>): SessionUser {
|
||||
const roleName = dbUser.role_name as string
|
||||
const mappedRole =
|
||||
roleName === "SUPER_ADMIN" || roleName === "ADMIN" ? "admin" : "sales"
|
||||
const roleMap: Record<string, string> = {
|
||||
SUPER_ADMIN: "super_admin",
|
||||
ADMIN: "admin",
|
||||
DEVELOPER: "developer",
|
||||
SALES_USER: "sales",
|
||||
}
|
||||
const mappedRole = roleMap[roleName] || "sales"
|
||||
|
||||
return {
|
||||
id: dbUser.id as string,
|
||||
|
||||
Reference in New Issue
Block a user