Skip to content

Commit 4881e8b

Browse files
committed
Revert "Add allowedFields configuration option to the Users & Permissions plugin documentation (#1716)"
This reverts commit 1c24b34.
1 parent 1c24b34 commit 4881e8b

File tree

3 files changed

+3
-159
lines changed

3 files changed

+3
-159
lines changed

docusaurus/docs/dev-docs/migration-guides.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ sidebarDepth: 0
88

99
# Migration guides
1010

11-
Migrations are necessary when upgrades to Strapi include breaking changes. The migration guides are sequential, meaning if there is more than 1 migration guide between your current version and the latest release, follow each guide in order.
12-
13-
If there is no specific migration guide between your current version and the latest release, you only need to follow the [guide to upgrade Strapi](/dev-docs/update-version.md).
11+
Migrations are necessary when upgrades to Strapi include breaking changes. The migration guides are sequential, meaning if there is more than 1 migration guide between your current version and the latest release, follow each guide in order. If there is no specific migration guide between your current version and the latest release follow the [Upgrade Strapi guide](/dev-docs/update-version.md).
1412

1513
:::caution
1614
[Plugins extension](/dev-docs/plugins/users-permissions) that create custom code or modify existing code will need to be updated and compared to the changes in the repository. Not updating the plugin extensions could break the application.
@@ -27,7 +25,6 @@ If there is no specific migration guide between your current version and the lat
2725
- [Migration guide from 4.4.5 to 4.5.1](/dev-docs/migration/v4/migration-guide-4.4.5-to-4.5.1)
2826
- [Migration guide from 4.5.1 to 4.6.1](/dev-docs/migration/v4/migration-guide-4.5.1-to-4.6.1)
2927
- [Migration guide from 4.6.1 to 4.7.0](/dev-docs/migration/v4/migration-guide-4.6.1-to-4.7.0)
30-
- [Migration guide from 4.10.1 to 4.11.0](/dev-docs/migration/v4/migration-guide-4.10.1-to-4.11.0)
3128

3229
## v3 to v4 migration guides
3330

docusaurus/docs/dev-docs/migration/v4/migration-guide-4.10.1-to-4.11.0.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

docusaurus/docs/dev-docs/plugins/users-permissions.md

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -201,58 +201,12 @@ Setting JWT expiry for more than 30 days is **not recommended** due to security
201201

202202
### Registration
203203

204-
#### Configuration
205-
206-
The Users and Permissions plugin only accepts email, username, and password fields by default. If additional fields were added to your user model and need to be accepted on registration, add these fields to the `allowedFields` in the `register` configuration option, otherwise the fields will be ignored.
207-
208-
For example, if you have added a field called `nickname` that you wish to accept from the user, update your configuration object as follows:
209-
210-
<Tabs groupId="js-ts">
211-
212-
<TabItem value="javascript" label="JavaScript">
213-
214-
```js title="./config/plugins.js"
215-
module.exports = ({ env }) => ({
216-
// ...
217-
"users-permissions": {
218-
config: {
219-
register: {
220-
allowedFields: ["nickname"],
221-
},
222-
},
223-
},
224-
// ...
225-
});
226-
```
227-
228-
</TabItem>
229-
230-
<TabItem value="typescript" label="TypeScript">
231-
232-
```ts title="./config/plugins.ts"
233-
export default ({ env }) => ({
234-
// ...
235-
"users-permissions": {
236-
config: {
237-
register: {
238-
allowedFields: ["nickname"],
239-
},
240-
},
241-
},
242-
// ...
243-
});
244-
```
245-
246-
</TabItem>
247-
248-
</Tabs>
204+
Creates a new user in the database with a default role as 'registered'.
249205

250206
#### Usage
251207

252-
Creates a new user in the database with a default role as 'registered'.
253-
254208
```js
255-
import axios from "axios";
209+
import axios from 'axios';
256210

257211
// Request API.
258212
// Add your own code here to customize or restrict how the public can register new users.

0 commit comments

Comments
 (0)