@strapi/plugin-users-permissions 4.3.7 → 4.3.9
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-users-permissions",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.9",
|
|
4
4
|
"description": "Protect your API with a full-authentication process based on JWT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@strapi/helper-plugin": "4.3.
|
|
31
|
-
"@strapi/utils": "4.3.
|
|
30
|
+
"@strapi/helper-plugin": "4.3.9",
|
|
31
|
+
"@strapi/utils": "4.3.9",
|
|
32
32
|
"bcryptjs": "2.4.3",
|
|
33
33
|
"grant-koa": "5.4.8",
|
|
34
34
|
"jsonwebtoken": "^8.1.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-test-renderer": "^17.0.2"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=14.19.1 <=
|
|
57
|
+
"node": ">=14.19.1 <=18.x.x",
|
|
58
58
|
"npm": ">=6.0.0"
|
|
59
59
|
},
|
|
60
60
|
"strapi": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"required": true,
|
|
65
65
|
"kind": "plugin"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "8ebf58d9edb62872acf88d19d1f878b4a1632ff7"
|
|
68
68
|
}
|
|
@@ -147,7 +147,7 @@ module.exports = {
|
|
|
147
147
|
.query('plugin::users-permissions.user')
|
|
148
148
|
.findOne({ where: { username } });
|
|
149
149
|
|
|
150
|
-
if (userWithSameUsername && userWithSameUsername.id
|
|
150
|
+
if (userWithSameUsername && _.toString(userWithSameUsername.id) !== _.toString(id)) {
|
|
151
151
|
throw new ApplicationError('Username already taken');
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -157,7 +157,7 @@ module.exports = {
|
|
|
157
157
|
.query('plugin::users-permissions.user')
|
|
158
158
|
.findOne({ where: { email: _.toLower(email) } });
|
|
159
159
|
|
|
160
|
-
if (userWithSameEmail && userWithSameEmail.id
|
|
160
|
+
if (userWithSameEmail && _.toString(userWithSameEmail.id) !== _.toString(id)) {
|
|
161
161
|
throw new ApplicationError('Email already taken');
|
|
162
162
|
}
|
|
163
163
|
body.email = _.toLower(body.email);
|
|
@@ -105,7 +105,7 @@ module.exports = {
|
|
|
105
105
|
.query('plugin::users-permissions.user')
|
|
106
106
|
.findOne({ where: { username } });
|
|
107
107
|
|
|
108
|
-
if (userWithSameUsername && userWithSameUsername.id
|
|
108
|
+
if (userWithSameUsername && _.toString(userWithSameUsername.id) !== _.toString(id)) {
|
|
109
109
|
throw new ApplicationError('Username already taken');
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -115,7 +115,7 @@ module.exports = {
|
|
|
115
115
|
.query('plugin::users-permissions.user')
|
|
116
116
|
.findOne({ where: { email: email.toLowerCase() } });
|
|
117
117
|
|
|
118
|
-
if (userWithSameEmail && userWithSameEmail.id
|
|
118
|
+
if (userWithSameEmail && _.toString(userWithSameEmail.id) !== _.toString(id)) {
|
|
119
119
|
throw new ApplicationError('Email already taken');
|
|
120
120
|
}
|
|
121
121
|
ctx.request.body.email = ctx.request.body.email.toLowerCase();
|