throw error if not logged in w/ burnettk

This commit is contained in:
jasquat 2022-12-14 12:24:38 -05:00
parent 7dd2e81048
commit 38ca1d60b3

View File

@ -42,7 +42,7 @@ export default function NavigationBar() {
const { targetUris } = useUriListForPermissions(); const { targetUris } = useUriListForPermissions();
// App.jsx forces login (which redirects to keycloak) so we should never get here if we're not logged in. // App.jsx forces login (which redirects to keycloak) so we should never get here if we're not logged in.
if (UserService.isLoggedIn()) { if (!UserService.isLoggedIn()) {
throw new UnauthenticatedError('You must be authenticated to do this.'); throw new UnauthenticatedError('You must be authenticated to do this.');
} }
const permissionRequestData: PermissionsToCheck = { const permissionRequestData: PermissionsToCheck = {