@aeriajs/builtins 0.0.282 → 0.0.284
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.
|
@@ -33,7 +33,7 @@ export const createAccountContract = defineContract({
|
|
|
33
33
|
});
|
|
34
34
|
export const createAccount = async (payload, context) => {
|
|
35
35
|
const userCandidate = Object.assign({}, payload);
|
|
36
|
-
if (!context.config.security.
|
|
36
|
+
if (!context.config.security.signup) {
|
|
37
37
|
return context.error(HTTPStatus.Forbidden, {
|
|
38
38
|
code: CreateAccountError.SignupDisallowed,
|
|
39
39
|
});
|
|
@@ -62,10 +62,7 @@ export const createAccount = async (payload, context) => {
|
|
|
62
62
|
details: error,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
if (context.config.security.signupDefaults) {
|
|
67
|
-
({ roles = [], ...defaults } = context.config.security.signupDefaults);
|
|
68
|
-
}
|
|
65
|
+
const { roles, ...defaults } = context.config.security.signup;
|
|
69
66
|
if (user.password) {
|
|
70
67
|
user.password = await bcrypt.hash(user.password, 10);
|
|
71
68
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.284",
|
|
5
5
|
"description": "## Installation",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@aeriajs/entrypoint": "link:../entrypoint",
|
|
39
39
|
"@aeriajs/types": "link:../types",
|
|
40
40
|
"@aeriajs/validation": "link:../validation",
|
|
41
|
-
"mongodb": "^6.
|
|
41
|
+
"mongodb": "^6.18.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aeriajs/common": "^0.0.
|
|
45
|
-
"@aeriajs/core": "^0.0.
|
|
46
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
47
|
-
"@aeriajs/types": "^0.0.
|
|
48
|
-
"@aeriajs/validation": "^0.0.
|
|
44
|
+
"@aeriajs/common": "^0.0.161",
|
|
45
|
+
"@aeriajs/core": "^0.0.284",
|
|
46
|
+
"@aeriajs/entrypoint": "^0.0.169",
|
|
47
|
+
"@aeriajs/types": "^0.0.137",
|
|
48
|
+
"@aeriajs/validation": "^0.0.185"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"test": "echo skipping",
|