diff --git a/package-lock.json b/package-lock.json index 0cd0068..5e8045d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@gridsuite/commons-ui": "0.100.0", + "@gridsuite/commons-ui": "0.101.0", "@hookform/resolvers": "^4.0.0", "@mui/icons-material": "^5.16.14", "@mui/lab": "5.0.0-alpha.175", @@ -3074,9 +3074,9 @@ } }, "node_modules/@gridsuite/commons-ui": { - "version": "0.100.0", - "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.100.0.tgz", - "integrity": "sha512-eQfRkNh4NIfFUz+hPLiu4XXQz7wzUg6jpMcQsJ0D5oqvztS1amIHgtdFkSxUBhPzwIvQ22mGpo2yeSdIi/IY/Q==", + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.101.0.tgz", + "integrity": "sha512-1nDH39fi2BpWbpT/1xlheG/Oy/nK6+qvQRBJ/v9whuUrdqE0GWpFYTTkjk+mqRiJBxMSmsEyNC1QvbUqbXyPRQ==", "license": "MPL-2.0", "dependencies": { "@ag-grid-community/locale": "^33.1.0", diff --git a/package.json b/package.json index 4b1890e..3ed8524 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", - "@gridsuite/commons-ui": "0.100.0", + "@gridsuite/commons-ui": "0.101.0", "@hookform/resolvers": "^4.0.0", "@mui/icons-material": "^5.16.14", "@mui/lab": "5.0.0-alpha.175", diff --git a/src/routes/router.tsx b/src/routes/router.tsx index 9745447..0a2b2c9 100644 --- a/src/routes/router.tsx +++ b/src/routes/router.tsx @@ -18,7 +18,7 @@ import { } from 'react-router'; import { useDispatch, useSelector } from 'react-redux'; import { AppState } from '../redux/reducer'; -import { AppsMetadataSrv, UserAdminSrv } from '../services'; +import { AppsMetadataSrv } from '../services'; import type { App } from '../components/App'; import { updateUserManagerDestructured } from '../redux/actions'; import { getErrorMessage } from '../utils/error'; @@ -78,7 +78,6 @@ const AppAuthStateWithRouterLayer: FunctionComponent { - return extractUserSub(user) - .then((sub) => { - console.debug(`Fetching access for user "${sub}"...`); - return backendFetch(`${USER_ADMIN_URL}/users/${sub}`, { method: 'head' }, getToken(user) ?? undefined); - }) - .then((response: Response) => { - //if the response is ok, the responseCode will be either 200 or 204 otherwise it's an HTTP error and it will be caught - return response.status === 200; - }) - .catch((error) => { - if (error.status === 403) { - return false; - } else { - throw error; - } - }); -} - export type UserInfos = { sub: string; profileName?: string;