createUser default billable
MODIFY
src/storage/mongodb/UserStorage.ts
src/storage/mongodb/UserStorage.ts
import FeatureToggles, { Feature } from '../../utils/FeatureToggles';
import Site, { SiteUser } from '../../types/Site';
import Tenant, { TenantComponents } from '../../types/Tenant';
-import User, { ImportedUser, UserRole, UserStatus } from '../../types/User';
+import User, { ImportedUser, USER_BILLABLE_DEFAULT, UserRole, UserStatus } from '../../types/User';
import { UserInError, UserInErrorType } from '../../types/InError';
import global, { FilterParams, Image, ImportStatus } from '../../types/GlobalType';
@@ -1154,7 +1154,8 @@ export default class UserStorage {
sendAdminAccountVerificationNotification: false,
},
role: UserRole.BASIC,
- status: UserStatus.PENDING
+ status: UserStatus.PENDING,
+ billable: USER_BILLABLE_DEFAULT
};
}

MODIFY
src/types/User.ts
src/types/User.ts
@@ -89,3 +89,4 @@ export const UserRequiredImportProperties = [
'name'
];
+export const USER_BILLABLE_DEFAULT = false;

MODIFY
test/api/context/ContextDefinition.ts
test/api/context/ContextDefinition.ts
@@ -512,7 +512,8 @@ export default class ContextDefinition {
visualID: new ObjectId().toString(),
issuer: false,
active: true
- }] : null)
+ }] : null),
+ billable: false,
},
{ // Basic user Locked
id: '5ce249a1a39ae1c056c789ef',

createUser default billable