Add mail manager role

part of #807
This commit is contained in:
Girish Ramakrishnan
2021-12-01 09:27:24 -08:00
parent 412bb406c0
commit e5fecdaabf
3 changed files with 28 additions and 23 deletions

View File

@@ -55,11 +55,12 @@ exports = module.exports = {
ROLE_ADMIN: 'admin',
ROLE_USER: 'user',
ROLE_USER_MANAGER: 'usermanager',
ROLE_MAIL_MANAGER: 'mailmanager',
ROLE_OWNER: 'owner',
compareRoles,
};
const ORDERED_ROLES = [ exports.ROLE_USER, exports.ROLE_USER_MANAGER, exports.ROLE_ADMIN, exports.ROLE_OWNER ];
const ORDERED_ROLES = [ exports.ROLE_USER, exports.ROLE_USER_MANAGER, exports.ROLE_MAIL_MANAGER, exports.ROLE_ADMIN, exports.ROLE_OWNER ];
// the avatar field is special and not added here to reduce response sizes
const USERS_FIELDS = [ 'id', 'username', 'email', 'fallbackEmail', 'password', 'salt', 'creationTime', 'inviteToken', 'resetToken', 'displayName',