Skip to content

Commit

Permalink
Merge pull request #565 from Heigvd/COL-175
Browse files Browse the repository at this point in the history
prevent admin pages access from simple users
  • Loading branch information
TehAwol authored Feb 8, 2024
2 parents 44389d4 + d0252da commit 3732a48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions colab-webapp/src/main/node/app/src/components/MainApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import EditorWrapper from './projects/edition/EditorWrapper';
import NewModelShared from './projects/models/NewModelShared';
import SettingsTabs from './settings/SettingsTabs';

export default function MainApp(): JSX.Element {
export default function MainApp(): React.ReactElement {
const dispatch = useAppDispatch();
const i18n = useTranslations();

Expand Down Expand Up @@ -141,7 +141,7 @@ export default function MainApp(): JSX.Element {
<Route path="/projects" element={<MyProjects />} />
<Route path="/models/*" element={<MyModels />} />
<Route path="/settings/*" element={<SettingsTabs />} />
<Route path="/admin/*" element={<AdminTabs />} />
{currentUser.admin && <Route path="/admin/*" element={<AdminTabs />} />}
<Route path="/bin/*" element={<ProjectsBin />} />
{/* <Route path="/project/:projectId/*" element={<EditorWrapper />} /> */}
<Route
Expand Down

0 comments on commit 3732a48

Please sign in to comment.