Bladeren bron

Fix isAuth returning undefined

jnfrati 3 jaren geleden
bovenliggende
commit
830743884d
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      dashboard/src/shared/auth/useAuth.ts

+ 1 - 1
dashboard/src/shared/auth/useAuth.ts

@@ -29,7 +29,7 @@ const useAuth = () => {
       }
       }
       // We iterate over all the policies in search for at least one policy that will authorize
       // We iterate over all the policies in search for at least one policy that will authorize
       // the user to perform an action.
       // the user to perform an action.
-      authContext.currentPolicy.reduce(
+      return authContext.currentPolicy.reduce(
         isAuthorizedReducer(scope, resource, verb),
         isAuthorizedReducer(scope, resource, verb),
         false
         false
       );
       );