User Rights include 56:
This commit is contained in:
@@ -74,7 +74,7 @@ export const handleEditPoi = (
|
||||
//console.log("User Rights:", userRights);
|
||||
|
||||
// Sicherstellen, dass userRights ein Array ist
|
||||
if (!Array.isArray(userRights)) {
|
||||
if (!userRights.some((r) => r.IdRight === 56)) {
|
||||
console.error("User Rights is not an array:", userRights);
|
||||
toast.error("Benutzerrechte sind ungültig.", {
|
||||
position: "top-center",
|
||||
@@ -88,7 +88,10 @@ 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.some((r) => r.IdRight === 56)) {
|
||||
|
||||
Reference in New Issue
Block a user