Mise à jour configuration et accès TrizRis dans OHIF
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
This commit is contained in:
1 parent
32b664fc1d
commit
753501679f
3 files changed
+6
-5
No files matched your search
@@ -24,7 +24,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
||||
|
||||
console.log('### VERIFICATION ACCES TRIZRIS ###', result);
|
||||
|
||||
setAuthorized(result);
|
||||
setAuthorized(result !== null && result.authorized === true);
|
||||
} catch (error) {
|
||||
console.error('### ERREUR VERIFICATION ACCES TRIZRIS ###', error);
|
||||
|
||||
@@ -45,8 +45,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Pendant la vérification :
|
||||
// on n'affiche PAS encore le viewer.
|
||||
// Vérification en cours
|
||||
if (checking) {
|
||||
return (
|
||||
<div
|
||||
@@ -59,6 +58,7 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
// Accès refusé
|
||||
if (!authorized) {
|
||||
return (
|
||||
<Navigate
|
||||
@@ -68,5 +68,6 @@ export default function TrizRisProtectedRoute({ children }: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
// Accès autorisé : afficher OHIF
|
||||
return <>{children}</>;
|
||||
}
|
||||
Reference in new issue
Block a user