Fixed user list not returned with role super admin
MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -291,7 +291,7 @@ export default class AuthorizationService {
'lastChangedOn', 'lastChangedBy', 'eulaAcceptedOn', 'eulaAcceptedVersion', 'locale',
'billingData.customerID', 'billingData.lastChangedOn'
],
- authorized: userToken.role === UserRole.ADMIN,
+ authorized: userToken.role === UserRole.ADMIN || userToken.role === UserRole.SUPER_ADMIN,
};
// Check projection
if (!Utils.isEmptyArray(filteredRequest.ProjectFields)) {
@@ -311,7 +311,7 @@ export default class AuthorizationService {
'id', 'name', 'firstName', 'email', 'role', 'status', 'issuer', 'locale', 'deleted', 'plateID',
'notificationsActive', 'notifications', 'phone', 'mobile', 'iNumber', 'costCenter', 'address'
],
- authorized: userToken.role === UserRole.ADMIN,
+ authorized: userToken.role === UserRole.ADMIN || userToken.role === UserRole.SUPER_ADMIN,
};
// Check projection
if (!Utils.isEmptyArray(filteredRequest.ProjectFields)) {

Fixed user list not returned with role super admin