billing - users.canSynchronizeBilling removed
MODIFY
src/authorization/Authorizations.ts
src/authorization/Authorizations.ts
@@ -644,10 +644,6 @@ export default class Authorizations {
return Authorizations.canPerformAction(loggedUser, Entity.BILLING, Action.CHECK_CONNECTION);
}
- public static async canSynchronizeUsersBilling(loggedUser: UserToken, authContext?: AuthorizationContext): Promise<AuthorizationResult> {
- return Authorizations.can(loggedUser, Entity.USER, Action.SYNCHRONIZE_BILLING_USERS, authContext);
- }
-
public static async canSynchronizeUserBilling(loggedUser: UserToken, authContext?: AuthorizationContext): Promise<AuthorizationResult> {
return Authorizations.can(loggedUser, Entity.USER, Action.SYNCHRONIZE_BILLING_USER, authContext);
}

MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -98,7 +98,6 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
admin: {
grants: [
- { resource: Entity.USER, action: Action.SYNCHRONIZE_BILLING_USERS },
{
resource: Entity.USER,
action: [

MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -212,7 +212,6 @@ export default class AuthorizationService {
users.canCreate = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.USER, Action.CREATE, authorizationFilter);
users.canExport = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.USER, Action.EXPORT, authorizationFilter);
users.canImport = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.USER, Action.IMPORT, authorizationFilter);
- users.canSynchronizeBilling = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.USER, Action.SYNCHRONIZE_BILLING_USERS, authorizationFilter);
for (const user of users.result) {
await AuthorizationService.addUserAuthorizations(tenant, userToken, user, authorizationFilter);
}

MODIFY
src/types/Authorization.ts
src/types/Authorization.ts
@@ -129,7 +129,6 @@ export enum Action {
EXPORT = 'Export',
CHANGE_AVAILABILITY = 'ChangeAvailability',
REFUND_TRANSACTION = 'RefundTransaction',
- SYNCHRONIZE_BILLING_USERS = 'SynchronizeBillingUsers',
SYNCHRONIZE_BILLING_USER = 'SynchronizeBillingUser',
BILLING_SETUP_PAYMENT_METHOD = 'BillingSetupPaymentMethod',
BILLING_PAYMENT_METHODS = 'BillingPaymentMethods',

MODIFY
src/types/DataResult.ts
src/types/DataResult.ts
@@ -62,7 +62,6 @@ export interface UserDataResult extends DataResult<User> {
canCreate: boolean;
canExport: boolean;
canImport: boolean;
- canSynchronizeBilling: boolean;
}
export interface TagDataResult extends DataResult<Tag> {
canCreate: boolean;

billing - users.canSynchronizeBilling removed