feat: JWT-basierte Token-Generierung und -Validierung für rollenbasierte UI-Zugriffe hinzugefügt
- `generateToken`-Funktion implementiert, um Tokens mit Benutzerrollen zu erstellen - `decodeToken` in `KueModal` hinzugefügt, um das Token zu dekodieren und den "Firmware Update"-Button für Admin-Rolle bedingt anzuzeigen - Fehlerbehandlung für ungültige Tokens in localStorage verbessert - Sicherstellung der Token-Dekodierung für Admin-Zugriffskontrolle in Entwicklungs- und Produktionsumgebung
This commit is contained in:
@@ -53,7 +53,7 @@ function Kabelueberwachung() {
|
||||
kueOnlineStatus: kueOnline[index],
|
||||
alarmStatus: alarmStatus[index],
|
||||
}));
|
||||
console.log("Alle Module:", allModules);
|
||||
//console.log("Alle Module:", allModules);
|
||||
|
||||
const racks = {
|
||||
rack1: allModules.slice(0, 8),
|
||||
@@ -63,7 +63,7 @@ function Kabelueberwachung() {
|
||||
};
|
||||
|
||||
// Konsolenausgaben für jede Rack-Aufteilung
|
||||
console.log(
|
||||
/* console.log(
|
||||
"Rack 1 Module:",
|
||||
racks.rack1.map((slot) => slot.modulName)
|
||||
);
|
||||
@@ -78,7 +78,7 @@ function Kabelueberwachung() {
|
||||
console.log(
|
||||
"Rack 4 Module:",
|
||||
racks.rack4.map((slot) => slot.modulName)
|
||||
);
|
||||
); */
|
||||
|
||||
// Funktion zum Wechseln des Racks
|
||||
const changeRack = (rack) => {
|
||||
@@ -87,11 +87,11 @@ function Kabelueberwachung() {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
console.log(`Aktives Rack: ${activeRack}`);
|
||||
/* console.log(`Aktives Rack: ${activeRack}`);
|
||||
console.log(
|
||||
`Rack ${activeRack} Modulnamen:`,
|
||||
racks[`rack${activeRack}`].map((slot) => slot.modulName)
|
||||
);
|
||||
); */
|
||||
}, [activeRack, racks]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user