fix issue: 5137 protected users and admin route with admin protection (#5263)

This commit is contained in:
Shailesh Parmar 2022-06-02 16:23:31 +05:30 committed by GitHub
parent c3d50df9bd
commit 8e525b60e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -170,6 +170,8 @@ export const ROUTES = {
SQL_BUILDER: '/sql-builder',
TEAMS_AND_USERS: '/teams-and-users',
TEAMS_AND_USERS_DETAILS: `/teams-and-users/${PLACEHOLDER_ROUTE_TEAM_AND_USER}`,
TEAMS_AND_USERS_USERS: `/teams-and-users/users`,
TEAMS_AND_USERS_ADMINS: `/teams-and-users/admins`,
SETTINGS: '/settings',
STORE: '/store',
FEEDS: '/feeds',

View File

@ -63,6 +63,16 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
component={TeamsAndUsersPage}
path={ROUTES.TEAMS_AND_USERS}
/>
<AdminProtectedRoute
exact
component={TeamsAndUsersPage}
path={ROUTES.TEAMS_AND_USERS_USERS}
/>
<AdminProtectedRoute
exact
component={TeamsAndUsersPage}
path={ROUTES.TEAMS_AND_USERS_ADMINS}
/>
<Route
exact
component={TeamsAndUsersPage}