From f47b1e90946937d4157e600eb5d412e2f2b047b7 Mon Sep 17 00:00:00 2001
From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it>
Date: Mon, 21 Jun 2021 08:46:37 +0200
Subject: [PATCH] Take role from external file.

---
 src/App.tsx | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/App.tsx b/src/App.tsx
index 59e8e97..0c65dd5 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -2,7 +2,6 @@ import React, { FC } from 'react';
 import { ThemeProvider } from '@material-ui/core/styles';
 import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
 import { AuthRoutes, NonAuthRoutes } from 'api/routes';
-import { Roles } from 'api/userRoles';
 import { configDjangoCookieName } from 'api/axios/configDjangoCookieName';
 import { appTheme } from 'App.style';
 import { withAuthorization } from 'components/Authorization/Authorization';
@@ -12,13 +11,7 @@ import { NotFound } from 'components/NotFound/NotFound';
 import { Unauthorized } from 'components/Unauthorized/Unauthorized';
 import { LandingPage } from 'components/LandingPage/LandingPage';
 import { configureInterceptors } from 'api/axios/configureInterceptors';
-
-const All = withAuthorization([
-  Roles.admin,
-  Roles.operator,
-  Roles.senior,
-  Roles.driver,
-]);
+import { All } from 'roles/All';
 
 /**
  * Entry point of the app.
-- 
GitLab