Skip to content

Commit

Permalink
Pas de message d'erreur si je me connecte avec un compte client et qu…
Browse files Browse the repository at this point in the history
…e j'accède à l'espace producteur #53
  • Loading branch information
benjaminpochat committed Dec 2, 2024
1 parent ca97b3b commit 25e7fdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/app/src/layouts/producer/AuthenticatedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ export default function AuthenticatedLayout() {

if (!authenticationService.isAuthenticated()) {
return <Navigate to='/authentication' />
}
if (authenticatedAsCustomer) {
} else if (authenticatedAsCustomer) {
return <Navigate to='/unauthorized' />
} else {
return getAuthenticatedLayout()
}
return getAuthenticatedLayout()
}

export async function loadAuthenticatedLayoutData(keycloak): Promise<{isAuthenticatedAsCustomer: boolean, environmentType: {label: String, color: String} | undefined}> {
Expand Down

0 comments on commit 25e7fdd

Please sign in to comment.