@strapi/plugin-users-permissions 4.1.4-alpha.0 → 4.2.0-alpha.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.
|
@@ -5,6 +5,7 @@ import { Table, Thead, Tbody, Tr, Td, Th } from '@strapi/design-system/Table';
|
|
|
5
5
|
import { VisuallyHidden } from '@strapi/design-system/VisuallyHidden';
|
|
6
6
|
import { Typography } from '@strapi/design-system/Typography';
|
|
7
7
|
import { IconButton } from '@strapi/design-system/IconButton';
|
|
8
|
+
import { Icon } from '@strapi/design-system/Icon';
|
|
8
9
|
import Pencil from '@strapi/icons/Pencil';
|
|
9
10
|
import Reload from '@strapi/icons/Refresh';
|
|
10
11
|
import { onRowClick, stopPropagation } from '@strapi/helper-plugin';
|
|
@@ -47,12 +48,14 @@ const EmailTable = ({ canUpdate, onEditClick }) => {
|
|
|
47
48
|
<Tbody>
|
|
48
49
|
<Tr {...onRowClick({ fn: () => onEditClick('reset_password') })}>
|
|
49
50
|
<Td>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
<Icon>
|
|
52
|
+
<Reload
|
|
53
|
+
aria-label={formatMessage({
|
|
54
|
+
id: getTrad('Email.template.reset_password'),
|
|
55
|
+
defaultMessage: 'Reset password',
|
|
56
|
+
})}
|
|
57
|
+
/>
|
|
58
|
+
</Icon>
|
|
56
59
|
</Td>
|
|
57
60
|
<Td>
|
|
58
61
|
<Typography>
|
|
@@ -76,12 +79,14 @@ const EmailTable = ({ canUpdate, onEditClick }) => {
|
|
|
76
79
|
</Tr>
|
|
77
80
|
<Tr {...onRowClick({ fn: () => onEditClick('email_confirmation') })}>
|
|
78
81
|
<Td>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
<Icon>
|
|
83
|
+
<Check
|
|
84
|
+
aria-label={formatMessage({
|
|
85
|
+
id: getTrad('Email.template.email_confirmation'),
|
|
86
|
+
defaultMessage: 'Email address confirmation',
|
|
87
|
+
})}
|
|
88
|
+
/>
|
|
89
|
+
</Icon>
|
|
85
90
|
</Td>
|
|
86
91
|
<Td>
|
|
87
92
|
<Typography>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-users-permissions",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-alpha.1",
|
|
4
4
|
"description": "Protect your API with a full-authentication process based on JWT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@purest/providers": "^1.0.2",
|
|
31
|
-
"@strapi/helper-plugin": "4.
|
|
32
|
-
"@strapi/utils": "4.
|
|
31
|
+
"@strapi/helper-plugin": "4.2.0-alpha.1",
|
|
32
|
+
"@strapi/utils": "4.2.0-alpha.1",
|
|
33
33
|
"bcryptjs": "2.4.3",
|
|
34
34
|
"grant-koa": "5.4.8",
|
|
35
35
|
"jsonwebtoken": "^8.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"required": true,
|
|
62
62
|
"kind": "plugin"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3a3567a85026c7685bbd826eed690044f602d876"
|
|
65
65
|
}
|
|
@@ -137,10 +137,7 @@ module.exports = {
|
|
|
137
137
|
throw new ValidationError('Incorrect code provided');
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
await getService('user').edit(user.id, {
|
|
141
|
-
resetPasswordToken: null,
|
|
142
|
-
password: params.password,
|
|
143
|
-
});
|
|
140
|
+
await getService('user').edit(user.id, { resetPasswordToken: null, password: params.password });
|
|
144
141
|
// Update the user.
|
|
145
142
|
ctx.send({
|
|
146
143
|
jwt: getService('jwt').issue({ id: user.id }),
|
|
@@ -425,7 +422,7 @@ module.exports = {
|
|
|
425
422
|
if (!user) {
|
|
426
423
|
return ctx.send({
|
|
427
424
|
email: params.email,
|
|
428
|
-
sent: true
|
|
425
|
+
sent: true
|
|
429
426
|
});
|
|
430
427
|
}
|
|
431
428
|
|