From 01df1274307638817cae09ef8bccb318d9b8c2c1 Mon Sep 17 00:00:00 2001 From: bytedream Date: Mon, 28 Aug 2023 17:20:01 +0200 Subject: [PATCH] fix logout not possible if admin write permission is not present --- src/routes/admin/logout/+server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/admin/logout/+server.ts b/src/routes/admin/logout/+server.ts index e1f75cf..2d23f00 100644 --- a/src/routes/admin/logout/+server.ts +++ b/src/routes/admin/logout/+server.ts @@ -1,9 +1,8 @@ import type { RequestHandler } from '@sveltejs/kit'; import { deleteSession, getSession } from '$lib/server/session'; -import { Permissions } from '$lib/permissions'; export const POST = (async ({ cookies }) => { - if (getSession(cookies, [Permissions.AdminWrite]) == null) { + if (getSession(cookies) == null) { return new Response(null, { status: 401 });