User Rights include 56:

This commit is contained in:
Ismail Ali
2025-05-25 11:20:35 +02:00
parent fc6a706769
commit 0d59fff439
4 changed files with 50 additions and 96 deletions

View File

@@ -84,10 +84,13 @@ export const handleEditPoi = (
return;
}
console.log("User Rights includes 56:", userRights.includes(56));
console.log(
"User Rights include 56:",
userRights.some((r) => r.IdRight === 56)
);
// Prüfung, ob der Benutzer die notwendigen Rechte hat
if (!userRights.includes(56)) {
if (!userRights.some((r) => r.IdRight === 56)) {
toast.error("Benutzer hat keine Berechtigung zum Bearbeiten.", {
position: "top-center",
autoClose: 5000,