fixed that admin didn't take the other roles rights
MODIFY
src/authorization/Authorizations.ts
src/authorization/Authorizations.ts
@@ -983,6 +983,12 @@ export default class Authorizations {
switch (userRole) {
case UserRole.ADMIN:
roles.push('admin');
+ if (sitesAdminCount > 0) {
+ roles.push('siteAdmin');
+ }
+ if (sitesOwnerCount > 0) {
+ roles.push('siteOwner');
+ }
break;
case UserRole.SUPER_ADMIN:
roles.push('superAdmin');

MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -734,16 +734,6 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
Action.EXPORT, Action.SYNCHRONIZE_REFUNDED_TRANSACTION, Action.UPDATE, Action.DELETE, Action.REMOTE_STOP_TRANSACTION
]
},
- {
- resource: Entity.TRANSACTION, action: Action.REFUND_TRANSACTION,
- condition: {
- Fn: 'custom:dynamicAuthorizations',
- args: {
- asserts: [],
- filters: ['SitesOwner']
- }
- }
- },
{
resource: Entity.TRANSACTION, action: Action.PUSH_TRANSACTION_CDR,
condition: {

fixed that admin didn't take the other roles rights