From d0f1e16126477062acfb01bfa7dbdfd3d0f59793 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Thu, 31 Oct 2024 11:12:39 +0000 Subject: [PATCH] add demoUser to api user auth --- api.planx.uk/modules/auth/middleware.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.planx.uk/modules/auth/middleware.ts b/api.planx.uk/modules/auth/middleware.ts index ef0335ff68..08c9a69e7a 100644 --- a/api.planx.uk/modules/auth/middleware.ts +++ b/api.planx.uk/modules/auth/middleware.ts @@ -219,10 +219,11 @@ export const useRoleAuth: UseRoleAuth = // Convenience methods for role-based access export const useTeamViewerAuth = useRoleAuth([ "teamViewer", + "demoUser", "teamEditor", "platformAdmin", ]); -export const useTeamEditorAuth = useRoleAuth(["teamEditor", "platformAdmin"]); +export const useTeamEditorAuth = useRoleAuth(["teamEditor", "platformAdmin", "demoUser"]); export const usePlatformAdminAuth = useRoleAuth(["platformAdmin"]); /**