billing - LAZY User Synchronization
MODIFY
src/storage/mongodb/UserStorage.ts
src/storage/mongodb/UserStorage.ts
+import FeatureToggles, { Feature } from '../../utils/FeatureToggles';
import Site, { SiteUser } from '../../types/Site';
import User, { ImportedUser, UserRole, UserStatus } from '../../types/User';
import { UserInError, UserInErrorType } from '../../types/InError';
@@ -877,6 +878,10 @@ export default class UserStorage {
((type === UserInErrorType.NO_BILLING_DATA || type === UserInErrorType.FAILED_BILLING_SYNCHRO) && !Utils.isTenantComponentActive(tenant, TenantComponents.BILLING))) {
continue;
}
+ if (type === UserInErrorType.NO_BILLING_DATA && !FeatureToggles.isFeatureActive(Feature.BILLING_SYNC_USERS)) {
+ // LAZY User Synchronization - no BillingData is not an Error anymore
+ continue;
+ }
array.push(`$${type}`);
facets.$facet[type] = UserStorage.getUserInErrorFacet(tenantID, type);
}

billing - LAZY User Synchronization