@akemona-org/strapi-plugin-users-permissions 3.7.0
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/LICENSE +22 -0
- package/README.md +19 -0
- package/admin/src/assets/images/logo.svg +1 -0
- package/admin/src/components/BaselineAlignement/index.js +33 -0
- package/admin/src/components/Bloc/index.js +10 -0
- package/admin/src/components/BoundRoute/Components.js +78 -0
- package/admin/src/components/BoundRoute/index.js +56 -0
- package/admin/src/components/ContainerFluid/index.js +13 -0
- package/admin/src/components/FormBloc/index.js +61 -0
- package/admin/src/components/IntlInput/index.js +38 -0
- package/admin/src/components/ListBaselineAlignment/index.js +8 -0
- package/admin/src/components/ListRow/Components.js +74 -0
- package/admin/src/components/ListRow/index.js +35 -0
- package/admin/src/components/ModalForm/Wrapper.js +12 -0
- package/admin/src/components/ModalForm/index.js +59 -0
- package/admin/src/components/Permissions/ListWrapper.js +9 -0
- package/admin/src/components/Permissions/PermissionRow/BaselineAlignment.js +7 -0
- package/admin/src/components/Permissions/PermissionRow/CheckboxWrapper.js +37 -0
- package/admin/src/components/Permissions/PermissionRow/RowStyle.js +28 -0
- package/admin/src/components/Permissions/PermissionRow/SubCategory/ConditionsButtonWrapper.js +13 -0
- package/admin/src/components/Permissions/PermissionRow/SubCategory/PolicyWrapper.js +8 -0
- package/admin/src/components/Permissions/PermissionRow/SubCategory/SubCategoryWrapper.js +26 -0
- package/admin/src/components/Permissions/PermissionRow/SubCategory/index.js +116 -0
- package/admin/src/components/Permissions/PermissionRow/index.js +92 -0
- package/admin/src/components/Permissions/index.js +44 -0
- package/admin/src/components/Permissions/init.js +14 -0
- package/admin/src/components/Permissions/reducer.js +27 -0
- package/admin/src/components/Policies/Components.js +26 -0
- package/admin/src/components/Policies/index.js +61 -0
- package/admin/src/components/PrefixedIcon/index.js +27 -0
- package/admin/src/components/Roles/EmptyRole/BaselineAlignment.js +7 -0
- package/admin/src/components/Roles/EmptyRole/index.js +27 -0
- package/admin/src/components/Roles/RoleListWrapper/index.js +17 -0
- package/admin/src/components/Roles/RoleRow/RoleDescription.js +9 -0
- package/admin/src/components/Roles/RoleRow/index.js +45 -0
- package/admin/src/components/Roles/index.js +3 -0
- package/admin/src/components/SizedInput/index.js +24 -0
- package/admin/src/components/UsersPermissions/index.js +91 -0
- package/admin/src/components/UsersPermissions/init.js +11 -0
- package/admin/src/components/UsersPermissions/reducer.js +60 -0
- package/admin/src/containers/AdvancedSettings/index.js +218 -0
- package/admin/src/containers/AdvancedSettings/reducer.js +65 -0
- package/admin/src/containers/AdvancedSettings/utils/form.js +52 -0
- package/admin/src/containers/EmailTemplates/CustomTextInput.js +105 -0
- package/admin/src/containers/EmailTemplates/Wrapper.js +36 -0
- package/admin/src/containers/EmailTemplates/index.js +222 -0
- package/admin/src/containers/EmailTemplates/reducer.js +58 -0
- package/admin/src/containers/EmailTemplates/utils/forms.js +81 -0
- package/admin/src/containers/EmailTemplates/utils/schema.js +25 -0
- package/admin/src/containers/Providers/index.js +283 -0
- package/admin/src/containers/Providers/reducer.js +54 -0
- package/admin/src/containers/Providers/utils/createProvidersArray.js +21 -0
- package/admin/src/containers/Providers/utils/forms.js +205 -0
- package/admin/src/containers/Roles/CreatePage/index.js +167 -0
- package/admin/src/containers/Roles/CreatePage/utils/schema.js +9 -0
- package/admin/src/containers/Roles/EditPage/index.js +161 -0
- package/admin/src/containers/Roles/EditPage/utils/schema.js +9 -0
- package/admin/src/containers/Roles/ListPage/BaselineAlignment.js +8 -0
- package/admin/src/containers/Roles/ListPage/index.js +188 -0
- package/admin/src/containers/Roles/ProtectedCreatePage/index.js +12 -0
- package/admin/src/containers/Roles/ProtectedEditPage/index.js +12 -0
- package/admin/src/containers/Roles/ProtectedListPage/index.js +15 -0
- package/admin/src/containers/Roles/index.js +35 -0
- package/admin/src/contexts/EditPage/index.js +26 -0
- package/admin/src/contexts/HomePage/index.js +27 -0
- package/admin/src/contexts/UsersPermissionsContext/index.js +17 -0
- package/admin/src/hooks/index.js +5 -0
- package/admin/src/hooks/useFetchRole/index.js +55 -0
- package/admin/src/hooks/useFetchRole/reducer.js +31 -0
- package/admin/src/hooks/useForm/index.js +96 -0
- package/admin/src/hooks/useForm/reducer.js +59 -0
- package/admin/src/hooks/usePlugins/index.js +73 -0
- package/admin/src/hooks/usePlugins/init.js +5 -0
- package/admin/src/hooks/usePlugins/reducer.js +37 -0
- package/admin/src/hooks/useRolesList/index.js +62 -0
- package/admin/src/hooks/useRolesList/init.js +5 -0
- package/admin/src/hooks/useRolesList/reducer.js +31 -0
- package/admin/src/index.js +109 -0
- package/admin/src/permissions.js +33 -0
- package/admin/src/pluginId.js +5 -0
- package/admin/src/translations/ar.json +49 -0
- package/admin/src/translations/cs.json +55 -0
- package/admin/src/translations/de.json +68 -0
- package/admin/src/translations/dk.json +116 -0
- package/admin/src/translations/en.json +104 -0
- package/admin/src/translations/es.json +70 -0
- package/admin/src/translations/fr.json +55 -0
- package/admin/src/translations/id.json +69 -0
- package/admin/src/translations/index.js +55 -0
- package/admin/src/translations/it.json +68 -0
- package/admin/src/translations/ja.json +53 -0
- package/admin/src/translations/ko.json +55 -0
- package/admin/src/translations/ms.json +54 -0
- package/admin/src/translations/nl.json +53 -0
- package/admin/src/translations/pl.json +55 -0
- package/admin/src/translations/pt-BR.json +49 -0
- package/admin/src/translations/pt.json +53 -0
- package/admin/src/translations/ru.json +68 -0
- package/admin/src/translations/sk.json +57 -0
- package/admin/src/translations/sv.json +68 -0
- package/admin/src/translations/th.json +66 -0
- package/admin/src/translations/tr.json +53 -0
- package/admin/src/translations/uk.json +54 -0
- package/admin/src/translations/vi.json +55 -0
- package/admin/src/translations/zh-Hans.json +104 -0
- package/admin/src/translations/zh.json +53 -0
- package/admin/src/utils/cleanPermissions.js +25 -0
- package/admin/src/utils/formatPolicies.js +8 -0
- package/admin/src/utils/getRequestURL.js +5 -0
- package/admin/src/utils/getTrad.js +5 -0
- package/admin/src/utils/index.js +4 -0
- package/config/functions/bootstrap.js +234 -0
- package/config/layout.js +10 -0
- package/config/policies/isAuthenticated.js +9 -0
- package/config/policies/permissions.js +93 -0
- package/config/policies/rateLimit.js +33 -0
- package/config/request.json +6 -0
- package/config/routes.json +397 -0
- package/config/schema.graphql.js +280 -0
- package/config/security.json +5 -0
- package/config/users-permissions-actions.js +80 -0
- package/controllers/Auth.js +612 -0
- package/controllers/User.js +125 -0
- package/controllers/UsersPermissions.js +291 -0
- package/controllers/user/admin.js +224 -0
- package/controllers/user/api.js +173 -0
- package/controllers/validation/email-template.js +40 -0
- package/documentation/1.0.0/overrides/users-permissions-Role.json +281 -0
- package/documentation/1.0.0/overrides/users-permissions-User.json +325 -0
- package/middlewares/users-permissions/defaults.json +5 -0
- package/middlewares/users-permissions/index.js +40 -0
- package/models/Permission.js +7 -0
- package/models/Permission.settings.json +43 -0
- package/models/Role.js +7 -0
- package/models/Role.settings.json +42 -0
- package/models/User.config.js +15 -0
- package/models/User.js +7 -0
- package/models/User.settings.json +62 -0
- package/package.json +70 -0
- package/services/Jwt.js +65 -0
- package/services/Providers.js +596 -0
- package/services/User.js +167 -0
- package/services/UsersPermissions.js +416 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const _ = require('lodash');
|
|
4
|
+
const { sanitizeEntity } = require('@akemona-org/strapi-utils');
|
|
5
|
+
|
|
6
|
+
const sanitizeUser = (user) =>
|
|
7
|
+
sanitizeEntity(user, {
|
|
8
|
+
model: strapi.query('user', 'users-permissions').model,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const formatError = (error) => [
|
|
12
|
+
{ messages: [{ id: error.id, message: error.message, field: error.field }] },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
/**
|
|
17
|
+
* Create a/an user record.
|
|
18
|
+
* @return {Object}
|
|
19
|
+
*/
|
|
20
|
+
async create(ctx) {
|
|
21
|
+
const advanced = await strapi
|
|
22
|
+
.store({
|
|
23
|
+
environment: '',
|
|
24
|
+
type: 'plugin',
|
|
25
|
+
name: 'users-permissions',
|
|
26
|
+
key: 'advanced',
|
|
27
|
+
})
|
|
28
|
+
.get();
|
|
29
|
+
|
|
30
|
+
const { email, username, password, role } = ctx.request.body;
|
|
31
|
+
|
|
32
|
+
if (!email) return ctx.badRequest('missing.email');
|
|
33
|
+
if (!username) return ctx.badRequest('missing.username');
|
|
34
|
+
if (!password) return ctx.badRequest('missing.password');
|
|
35
|
+
|
|
36
|
+
const userWithSameUsername = await strapi
|
|
37
|
+
.query('user', 'users-permissions')
|
|
38
|
+
.findOne({ username });
|
|
39
|
+
|
|
40
|
+
if (userWithSameUsername) {
|
|
41
|
+
return ctx.badRequest(
|
|
42
|
+
null,
|
|
43
|
+
formatError({
|
|
44
|
+
id: 'Auth.form.error.username.taken',
|
|
45
|
+
message: 'Username already taken.',
|
|
46
|
+
field: ['username'],
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (advanced.unique_email) {
|
|
52
|
+
const userWithSameEmail = await strapi
|
|
53
|
+
.query('user', 'users-permissions')
|
|
54
|
+
.findOne({ email: email.toLowerCase() });
|
|
55
|
+
|
|
56
|
+
if (userWithSameEmail) {
|
|
57
|
+
return ctx.badRequest(
|
|
58
|
+
null,
|
|
59
|
+
|
|
60
|
+
formatError({
|
|
61
|
+
id: 'Auth.form.error.email.taken',
|
|
62
|
+
message: 'Email already taken.',
|
|
63
|
+
field: ['email'],
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const user = {
|
|
70
|
+
...ctx.request.body,
|
|
71
|
+
provider: 'local',
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
user.email = user.email.toLowerCase();
|
|
75
|
+
|
|
76
|
+
if (!role) {
|
|
77
|
+
const defaultRole = await strapi
|
|
78
|
+
.query('role', 'users-permissions')
|
|
79
|
+
.findOne({ type: advanced.default_role }, []);
|
|
80
|
+
|
|
81
|
+
user.role = defaultRole.id;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
const data = await strapi.plugins['users-permissions'].services.user.add(user);
|
|
86
|
+
|
|
87
|
+
ctx.created(sanitizeUser(data));
|
|
88
|
+
} catch (error) {
|
|
89
|
+
ctx.badRequest(null, formatError(error));
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Update a/an user record.
|
|
94
|
+
* @return {Object}
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
async update(ctx) {
|
|
98
|
+
const advancedConfigs = await strapi
|
|
99
|
+
.store({
|
|
100
|
+
environment: '',
|
|
101
|
+
type: 'plugin',
|
|
102
|
+
name: 'users-permissions',
|
|
103
|
+
key: 'advanced',
|
|
104
|
+
})
|
|
105
|
+
.get();
|
|
106
|
+
|
|
107
|
+
const { id } = ctx.params;
|
|
108
|
+
const { email, username, password } = ctx.request.body;
|
|
109
|
+
|
|
110
|
+
const user = await strapi.plugins['users-permissions'].services.user.fetch({
|
|
111
|
+
id,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
if (_.has(ctx.request.body, 'email') && !email) {
|
|
115
|
+
return ctx.badRequest('email.notNull');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (_.has(ctx.request.body, 'username') && !username) {
|
|
119
|
+
return ctx.badRequest('username.notNull');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (_.has(ctx.request.body, 'password') && !password && user.provider === 'local') {
|
|
123
|
+
return ctx.badRequest('password.notNull');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (_.has(ctx.request.body, 'username')) {
|
|
127
|
+
const userWithSameUsername = await strapi
|
|
128
|
+
.query('user', 'users-permissions')
|
|
129
|
+
.findOne({ username });
|
|
130
|
+
|
|
131
|
+
if (userWithSameUsername && userWithSameUsername.id != id) {
|
|
132
|
+
return ctx.badRequest(
|
|
133
|
+
null,
|
|
134
|
+
formatError({
|
|
135
|
+
id: 'Auth.form.error.username.taken',
|
|
136
|
+
message: 'username.alreadyTaken.',
|
|
137
|
+
field: ['username'],
|
|
138
|
+
})
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (_.has(ctx.request.body, 'email') && advancedConfigs.unique_email) {
|
|
144
|
+
const userWithSameEmail = await strapi
|
|
145
|
+
.query('user', 'users-permissions')
|
|
146
|
+
.findOne({ email: email.toLowerCase() });
|
|
147
|
+
|
|
148
|
+
if (userWithSameEmail && userWithSameEmail.id != id) {
|
|
149
|
+
return ctx.badRequest(
|
|
150
|
+
null,
|
|
151
|
+
formatError({
|
|
152
|
+
id: 'Auth.form.error.email.taken',
|
|
153
|
+
message: 'Email already taken',
|
|
154
|
+
field: ['email'],
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
ctx.request.body.email = ctx.request.body.email.toLowerCase();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
let updateData = {
|
|
162
|
+
...ctx.request.body,
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
if (_.has(ctx.request.body, 'password') && password === user.password) {
|
|
166
|
+
delete updateData.password;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const data = await strapi.plugins['users-permissions'].services.user.edit({ id }, updateData);
|
|
170
|
+
|
|
171
|
+
ctx.send(sanitizeUser(data));
|
|
172
|
+
},
|
|
173
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const _ = require('lodash');
|
|
4
|
+
|
|
5
|
+
const invalidPatternsRegexes = [/<%[^=]([^<>%]*)%>/m, /\${([^{}]*)}/m];
|
|
6
|
+
const authorizedKeys = ['URL', 'CODE', 'USER', 'USER.email', 'USER.username', 'TOKEN'];
|
|
7
|
+
|
|
8
|
+
const matchAll = (pattern, src) => {
|
|
9
|
+
const matches = [];
|
|
10
|
+
let match;
|
|
11
|
+
|
|
12
|
+
const regexPatternWithGlobal = RegExp(pattern, 'g');
|
|
13
|
+
while ((match = regexPatternWithGlobal.exec(src))) {
|
|
14
|
+
const [, group] = match;
|
|
15
|
+
|
|
16
|
+
matches.push(_.trim(group));
|
|
17
|
+
}
|
|
18
|
+
return matches;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const isValidEmailTemplate = template => {
|
|
22
|
+
for (let reg of invalidPatternsRegexes) {
|
|
23
|
+
if (reg.test(template)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const matches = matchAll(/<%=([^<>%=]*)%>/, template);
|
|
29
|
+
for (const match of matches) {
|
|
30
|
+
if (!authorizedKeys.includes(match)) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
module.exports = {
|
|
39
|
+
isValidEmailTemplate,
|
|
40
|
+
};
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"paths": {
|
|
3
|
+
"/users-permissions/init": {
|
|
4
|
+
"get": {
|
|
5
|
+
"responses": {
|
|
6
|
+
"200": {
|
|
7
|
+
"description": "Response",
|
|
8
|
+
"content": {
|
|
9
|
+
"application/json": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"properties": {
|
|
12
|
+
"hasAdmin": {
|
|
13
|
+
"type": "boolean"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"/users-permissions/roles/{id}": {
|
|
24
|
+
"get": {
|
|
25
|
+
"responses": {
|
|
26
|
+
"200": {
|
|
27
|
+
"content": {
|
|
28
|
+
"application/json": {
|
|
29
|
+
"schema": {
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"name": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 3
|
|
37
|
+
},
|
|
38
|
+
"description": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"type": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"permissions": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"required": ["id", "type", "controller", "action", "enabled"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"id": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"type": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"controller": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"action": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"enabled": {
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
"policy": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"role": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"created_by": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"updated_by": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"created_by": {
|
|
80
|
+
"required": ["id", "email"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"id": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"firstname": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"lastname": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"username": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"email": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"password": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"resetPasswordToken": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"registrationToken": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"isActive": {
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"roles": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"blocked": {
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"updated_by": {
|
|
121
|
+
"required": ["id", "email"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"id": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"firstname": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"lastname": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"username": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"email": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"password": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"resetPasswordToken": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"registrationToken": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"isActive": {
|
|
148
|
+
"type": "boolean"
|
|
149
|
+
},
|
|
150
|
+
"roles": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"blocked": {
|
|
157
|
+
"type": "boolean"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"/users-permissions/roles": {
|
|
170
|
+
"get": {
|
|
171
|
+
"responses": {
|
|
172
|
+
"200": {
|
|
173
|
+
"content": {
|
|
174
|
+
"application/json": {
|
|
175
|
+
"schema": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"properties": {
|
|
179
|
+
"id": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"name": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 3
|
|
185
|
+
},
|
|
186
|
+
"description": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"nb_users": {
|
|
190
|
+
"type": "integer"
|
|
191
|
+
},
|
|
192
|
+
"type": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
},
|
|
195
|
+
"created_by": {
|
|
196
|
+
"required": ["id", "email"],
|
|
197
|
+
"properties": {
|
|
198
|
+
"id": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
"firstname": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"lastname": {
|
|
205
|
+
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"username": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"email": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
"password": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"resetPasswordToken": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
},
|
|
219
|
+
"registrationToken": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"isActive": {
|
|
223
|
+
"type": "boolean"
|
|
224
|
+
},
|
|
225
|
+
"roles": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"blocked": {
|
|
232
|
+
"type": "boolean"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"updated_by": {
|
|
237
|
+
"required": ["id", "email"],
|
|
238
|
+
"properties": {
|
|
239
|
+
"id": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"firstname": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
"lastname": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"username": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"email": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"password": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"isActive": {
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
"roles": {
|
|
261
|
+
"type": "array",
|
|
262
|
+
"items": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"blocked": {
|
|
267
|
+
"type": "boolean"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|