Skip to content

Commit

Permalink
Fixed access to non-admin pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jul 6, 2022
1 parent 5d5dc4d commit 3c4526c
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions ui/src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { SessionModal } from './core/user/SessionModal';
import { Roles } from './admin/Roles';
import { Groups } from './admin/Groups';
import { BASE_PATH } from './App.constant';
import { ProtectRoute } from './core/components/ProtectRoute';


function App() {
Expand Down Expand Up @@ -81,12 +82,32 @@ function App() {
</Route>
<Route path="/dashboard" component={Dashboard} />
<Route path="/metadata/source/new" component={NewSource} />
<Route path="/metadata/provider/new" component={NewProvider} />
<Route path="/metadata/attributes" component={Attribute} />
<Route path="/metadata/provider/:id/filter" component={Filter} />
<Route path="/metadata/provider/new" render={() =>
<ProtectRoute redirectTo="/dashboard">
<NewProvider />
</ProtectRoute>
} />
<Route path="/metadata/attributes" render={() =>
<ProtectRoute redirectTo="/dashboard">
<Attribute />
</ProtectRoute>
} />
<Route path="/metadata/provider/:id/filter" render={() =>
<ProtectRoute redirectTo="/dashboard">
<Filter />
</ProtectRoute>
} />
<Route path="/metadata/:type/:id" component={Metadata} />
<Route path="/roles" component={Roles} />
<Route path="/groups" component={Groups} />
<Route path="/roles" render={() =>
<ProtectRoute redirectTo="/dashboard">
<Roles />
</ProtectRoute>
} />
<Route path="/groups" render={() =>
<ProtectRoute redirectTo="/dashboard">
<Groups />
</ProtectRoute>
} />
<Route path="*">
<Redirect to="/dashboard" />
</Route>
Expand Down

0 comments on commit 3c4526c

Please sign in to comment.