@getjones/test-infra 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const Endpoints = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
const invite = (projectId, invitedTenantUser, context) => {
|
|
12
|
-
return requests.putRequestHandler(Endpoints.invite(projectId), invitedTenantUser, context, {}
|
|
12
|
+
return requests.putRequestHandler(Endpoints.invite(projectId), invitedTenantUser, context, {});
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const getTenantUsersByProjectId = (projectId, context) => {
|
|
@@ -38,7 +38,7 @@ const getTenantUserByEmail = async (projectId, email, context) => {
|
|
|
38
38
|
return tenant;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const getOrCreateTenantUser = async (projectId, email, company, requestId, context, { fullName = 'Tenant User', password = credentials.strongPassword } = {}) => {
|
|
41
|
+
const getOrCreateTenantUser = async (projectId, email, company, requestId, context, { fullName = 'Tenant User', password = credentials.strongPassword, toSignUp = true } = {}) => {
|
|
42
42
|
let tenantUser = await getTenantUserByEmail(projectId, email, context);
|
|
43
43
|
|
|
44
44
|
if (tenantUser && tenantUser.subuserId && tenantUser.isVerified) {
|
|
@@ -54,8 +54,8 @@ const getOrCreateTenantUser = async (projectId, email, company, requestId, conte
|
|
|
54
54
|
|
|
55
55
|
tenantUser = await getTenantUserByEmail(projectId, email, context);
|
|
56
56
|
|
|
57
|
-
//Already signup tenant user
|
|
58
|
-
if (tenantUser.isVerified) {
|
|
57
|
+
//Already signup tenant user or pending user needed
|
|
58
|
+
if (tenantUser.isVerified || !toSignUp) {
|
|
59
59
|
return tenantUser;
|
|
60
60
|
}
|
|
61
61
|
|