From 25ec08f0f69cf812543dc390c7a0973e90032ef9 Mon Sep 17 00:00:00 2001 From: 7dev7urandom <30197373+7dev7urandom@users.noreply.github.com> Date: Wed, 28 Aug 2024 23:29:28 -0400 Subject: [PATCH] Fix remaining issues from broken commit --- source/SIL.AppBuilder.Portal/src/auth.ts | 4 ---- source/SIL.AppBuilder.Portal/src/lib/bullmq.ts | 7 ------- 2 files changed, 11 deletions(-) delete mode 100644 source/SIL.AppBuilder.Portal/src/lib/bullmq.ts diff --git a/source/SIL.AppBuilder.Portal/src/auth.ts b/source/SIL.AppBuilder.Portal/src/auth.ts index 09af99cf8..989c05afd 100644 --- a/source/SIL.AppBuilder.Portal/src/auth.ts +++ b/source/SIL.AppBuilder.Portal/src/auth.ts @@ -2,7 +2,6 @@ import { SvelteKitAuth, type DefaultSession, type SvelteKitAuthConfig } from '@a import Auth0Provider from '@auth/sveltekit/providers/auth0'; import { redirect, type Handle } from '@sveltejs/kit'; import { DatabaseWrites, prisma } from 'sil.appbuilder.portal.common'; -import { RoleId } from 'sil.appbuilder.portal.common/prisma'; declare module '@auth/sveltekit' { interface Session { @@ -43,12 +42,9 @@ const config: SvelteKitAuthConfig = { // make sure to handle values that could change mid-session in both cases // safest method is just handle such values in session below (see user.roles) - // user.isSuperAdmin is a special case handled here to give the /admin/jobs route - // access to see if the user has permission to see the BullMQ bull-board queue if (!profile) return token; const dbUser = await DatabaseWrites.users.getOrCreateUser(profile); token.userId = dbUser.Id; - token.isSuperAdmin = !!dbUser.UserRoles.find((r) => r.RoleId === RoleId.SuperAdmin); return token; }, async session({ session, token }) { diff --git a/source/SIL.AppBuilder.Portal/src/lib/bullmq.ts b/source/SIL.AppBuilder.Portal/src/lib/bullmq.ts deleted file mode 100644 index 0234f8e79..000000000 --- a/source/SIL.AppBuilder.Portal/src/lib/bullmq.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Queue } from 'bullmq'; - -export const scriptoriaQueue = new Queue('scriptoria', { - connection: { - host: 'redis' - } -});