fix: update application title to 'Workshop Manager' and enhance authorization checks for new motivators route
This commit is contained in:
@@ -14,7 +14,7 @@ const geistMono = Geist_Mono({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: 'SWOT Manager',
|
title: 'Workshop Manager',
|
||||||
description: "Application de gestion d'ateliers SWOT pour entretiens managériaux",
|
description: "Application de gestion d'ateliers SWOT pour entretiens managériaux",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ export const authConfig: NextAuthConfig = {
|
|||||||
authorized({ auth, request: { nextUrl } }) {
|
authorized({ auth, request: { nextUrl } }) {
|
||||||
const isLoggedIn = !!auth?.user;
|
const isLoggedIn = !!auth?.user;
|
||||||
const isOnProtectedPage =
|
const isOnProtectedPage =
|
||||||
nextUrl.pathname.startsWith('/sessions') || nextUrl.pathname.startsWith('/api/sessions');
|
nextUrl.pathname.startsWith('/sessions') ||
|
||||||
|
nextUrl.pathname.startsWith('/api/sessions') ||
|
||||||
|
nextUrl.pathname.startsWith('/motivators') ||
|
||||||
|
nextUrl.pathname.startsWith('/api/motivators');
|
||||||
const isOnAuthPage =
|
const isOnAuthPage =
|
||||||
nextUrl.pathname.startsWith('/login') || nextUrl.pathname.startsWith('/register');
|
nextUrl.pathname.startsWith('/login') || nextUrl.pathname.startsWith('/register');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user