diff --git a/src/config/roles.js b/src/config/roles.js index fb76ba61..dcf42c73 100644 --- a/src/config/roles.js +++ b/src/config/roles.js @@ -1,8 +1,10 @@ -const roles = ['user', 'admin']; +const allRoles = { + user: [], + admin: ['getUsers', 'manageUsers'], +}; -const roleRights = new Map(); -roleRights.set(roles[0], []); -roleRights.set(roles[1], ['getUsers', 'manageUsers']); +const roles = Object.keys(allRoles); +const roleRights = new Map(Object.entries(allRoles)); module.exports = { roles,