Skip to content

Commit d5f113d

Browse files
Xaohssvenvandescheur
authored andcommitted
🐛 - fix: fixed the hiding
1 parent 18b78d7 commit d5f113d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frontend/src/App.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { useAsync } from "react-use";
2828

2929
import "./App.css";
3030
import { User, getOIDCInfo, whoAmI } from "./lib/api/auth";
31+
import { canStartDestructionList } from "./lib/auth/permissions";
3132
import OidcConfigContext, {
3233
OidcConfigContextType,
3334
} from "./lib/contexts/OidcConfigContext";
@@ -84,6 +85,7 @@ function App() {
8485
{
8586
children: <Solid.DocumentPlusIcon />,
8687
title: "Vernietigingslijst opstellen",
88+
hidden: user ? !canStartDestructionList(user) : true,
8789
// size: "xl",
8890
onClick: () => navigate("/destruction-lists/create"),
8991
},

0 commit comments

Comments
 (0)