Fix jwt-token
This commit is contained in:
@@ -26,6 +26,41 @@ const users = {
|
|||||||
username: 'branding_manager',
|
username: 'branding_manager',
|
||||||
role: 'branding_admin'
|
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: {
|
operator: {
|
||||||
id: 5,
|
id: 5,
|
||||||
username: 'basic_operator',
|
username: 'basic_operator',
|
||||||
|
|||||||
Reference in New Issue
Block a user