Billing setting abac migration
MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -1151,7 +1151,7 @@ export default class AuthorizationService {
setting.canUpdate = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.SETTING, Action.UPDATE, authorizationFilter);
setting.canDelete = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.SETTING, Action.DELETE, authorizationFilter);
setting.canSyncRefund = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.TRANSACTION, Action.SYNCHRONIZE_REFUNDED_TRANSACTION, authorizationFilter);
-
+ setting.canCheckBillingConnection = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.BILLING, Action.CHECK_CONNECTION, authorizationFilter);
// Remove auth flags set to false
Utils.removeCanPropertiesWithFalseValue(setting);
}

MODIFY
src/types/Authorization.ts
src/types/Authorization.ts
@@ -362,6 +362,7 @@ export interface TransactionAuthorizationActions extends AuthorizationActions {
export interface SettingAuthorizationActions extends AuthorizationActions {
canSyncRefund?: boolean;
+ canCheckBillingConnection?: boolean;
}
export enum DynamicAuthorizationFilterName {

Billing setting abac migration