zyket 1.2.17 → 1.2.18
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 +1 -1
- package/src/services/auth/index.js +20 -14
package/package.json
CHANGED
|
@@ -64,6 +64,10 @@ module.exports = class AuthService extends Service {
|
|
|
64
64
|
return [];
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
get organizationEnabled() {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
67
71
|
get socialProviders() {
|
|
68
72
|
return {}
|
|
69
73
|
}
|
|
@@ -107,22 +111,24 @@ module.exports = class AuthService extends Service {
|
|
|
107
111
|
plugins: [
|
|
108
112
|
admin(),
|
|
109
113
|
bearer(),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
...(this.organizationEnabled ? [
|
|
115
|
+
organization({
|
|
116
|
+
schema: {
|
|
117
|
+
organization: {
|
|
118
|
+
additionalFields: this.organizationAdditionalFields
|
|
119
|
+
},
|
|
120
|
+
member: {
|
|
121
|
+
additionalFields: this.memberAdditionalFields
|
|
122
|
+
}
|
|
114
123
|
},
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
allowUserToCreateOrganization: async (user) => {
|
|
125
|
+
return await this.allowUserToCreateOrganization(user);
|
|
126
|
+
},
|
|
127
|
+
sendInvitationEmail: async (data) => {
|
|
128
|
+
return await this.sendInvitationEmail(data);
|
|
117
129
|
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return await this.allowUserToCreateOrganization(user);
|
|
121
|
-
},
|
|
122
|
-
sendInvitationEmail: async (data) => {
|
|
123
|
-
return await this.sendInvitationEmail(data);
|
|
124
|
-
}
|
|
125
|
-
}),
|
|
130
|
+
})
|
|
131
|
+
] : []),
|
|
126
132
|
...this.plugins,
|
|
127
133
|
],
|
|
128
134
|
socialProviders: this.socialProviders,
|