From ef5c1830e7e9cbb2b8ff5c31ac364f6c278df0e0 Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Sat, 13 Sep 2025 14:12:29 +0200 Subject: [PATCH] Fix jwt-token --- server/test-rbac.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/server/test-rbac.js b/server/test-rbac.js index f2e010b..2d703f8 100644 --- a/server/test-rbac.js +++ b/server/test-rbac.js @@ -26,6 +26,41 @@ const users = { username: 'branding_manager', role: 'branding_admin' }, + operator: { + id: 5, + username: 'device_operator', + role: 'operator' + }, + viewer: { + id: 6, + username: 'read_only_user', + role: 'viewer' + } +}; + +console.log('๐Ÿงช Testing RBAC System\n'); + +// Display available roles and their permissions +console.log('๐Ÿ“‹ Available Roles:'); +Object.entries(ROLES).forEach(([role, permissions]) => { + console.log(` ${role}: ${permissions.join(', ')}`); +}); + +console.log('\n๐Ÿ“‹ Available Permissions:'); +Object.entries(PERMISSIONS).forEach(([permission, description]) => { + console.log(` ${permission}: ${description}`); +}); + }, + security_admin: { + id: 3, + username: 'security_manager', + role: 'security_admin' + }, + branding_admin: { + id: 4, + username: 'branding_manager', + role: 'branding_admin' + }, operator: { id: 5, username: 'basic_operator',