Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/rbac #6965

Merged
merged 594 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
594 commits
Select commit Hold shift + click to select a range
99797ce
Add permissions for delete create update
soupette Jun 22, 2020
c6d37dc
Add tests
soupette Jun 22, 2020
84c4591
Remove useless file
soupette Jun 22, 2020
711c58b
create role at startup + warning
petersg83 Jun 12, 2020
a6e090d
prevent modification and delete of super admin role
petersg83 Jun 15, 2020
3b8cab0
add conditions logic for author/editor
petersg83 Jun 15, 2020
93fc900
create admin permissions at startup
petersg83 Jun 16, 2020
98f8275
prevent removing the last superadmin
petersg83 Jun 16, 2020
d35e1d3
remove user delete route
petersg83 Jun 16, 2020
8c1aa29
fix tests
petersg83 Jun 16, 2020
b893501
first refacto
petersg83 Jun 18, 2020
6ab7669
rename plugins::content-manager.create to plugins::content-manager.ex…
petersg83 Jun 18, 2020
dd88c00
use new condition format
petersg83 Jun 18, 2020
243c4cc
add upload permissions to default roles + second refacto
petersg83 Jun 18, 2020
6a1d65b
third refacto
petersg83 Jun 19, 2020
8598cee
fourth refacto
petersg83 Jun 22, 2020
3084b85
rename attributes -> values
petersg83 Jun 22, 2020
1ee5b7f
fifth refacto
petersg83 Jun 23, 2020
047a0be
move function from bootstrap to service
petersg83 Jun 24, 2020
1d3a054
update yarn.lock
petersg83 Jun 24, 2020
25bea05
prevent delete user route to delete last superAdmin
petersg83 Jun 24, 2020
eb895d7
populate only roles
petersg83 Jun 25, 2020
a471693
Fix param sent to the API
soupette Jun 25, 2020
316cf44
remote ML settings permissions for creator and editor
petersg83 Jun 26, 2020
3c6bb04
Finish content types permissions
HichamELBSI Jun 21, 2020
c75a0fe
Fix PR review
HichamELBSI Jun 23, 2020
342e0a9
Fix PR review 2
HichamELBSI Jun 24, 2020
987eb9f
Fix create view
HichamELBSI Jun 25, 2020
82316bb
Allow or operator and working with bookshelf
alexandrebodin Jun 25, 2020
6776a3c
Add mongo support
alexandrebodin Jun 25, 2020
c8d743e
Cleanup and add tests
alexandrebodin Jun 26, 2020
966d9c5
Move hasDeepFilters to utils
alexandrebodin Jun 26, 2020
7839c05
Created selector to avoid rerenders
soupette Jun 24, 2020
ab01454
Fix perfs issues
soupette Jun 24, 2020
196a624
Rename selectors
soupette Jun 24, 2020
b8428bc
Fix PR feedback
soupette Jun 26, 2020
3fe3c2f
Fix errors users
soupette Jun 25, 2020
f8ea8c8
Add delete users
soupette Jun 26, 2020
278f938
Fix permissions for CM
soupette Jun 26, 2020
572397d
Fix PR feedback
soupette Jun 26, 2020
ac9906a
Add plugins permissions
HichamELBSI Jun 25, 2020
1b2dea8
Add settings and plugins permissions tabs
HichamELBSI Jun 27, 2020
fc64f20
Created NotAllowedInput
soupette Jun 25, 2020
d5332d4
Temp commit
soupette Jun 25, 2020
367713c
Upgrade buffet
soupette Jun 25, 2020
ec80117
Add permissions for creating to simple ct
soupette Jun 26, 2020
fde9b99
Add permissions to Inputs level
soupette Jun 26, 2020
f2c9716
Fix dynamiczones
soupette Jun 26, 2020
b8a979f
Add permissions for create action only for collectionTypes
soupette Jun 29, 2020
8b7aecd
Fix dynamiczones
soupette Jun 26, 2020
2d4eb1d
Clean code
soupette Jun 29, 2020
0f91108
Fix header
soupette Jun 29, 2020
268cec1
Fix documentation permissions
soupette Jun 29, 2020
bfadebd
fix tests after upload.settings.read being removed from default permi…
petersg83 Jun 29, 2020
e000432
add the possibility to edit the template for the forgot password email
petersg83 Jun 29, 2020
de395df
refacto
petersg83 Jun 29, 2020
9b74a5a
Make default permission use up to 15 level of nesting
alexandrebodin Jun 29, 2020
8ad41a4
Fix attribute name mismatch
HichamELBSI Jun 29, 2020
70300ff
Delete the current user last
soupette Jun 29, 2020
8cc73a5
Fix loading button
soupette Jun 29, 2020
5dd399d
Fix PR feedback
soupette Jun 30, 2020
5774711
Add permissions for update
soupette Jun 29, 2020
ddb3726
Add permissions to edit
soupette Jun 29, 2020
af69b04
Fix single types and input media
soupette Jun 29, 2020
07d24de
Fix input media
soupette Jun 29, 2020
5175642
Fix NotAllowedInput trad
soupette Jun 30, 2020
5391bad
Add page title to settings
soupette Jun 30, 2020
694db8e
Remove 403 response redirection
soupette Jun 30, 2020
9a2b91d
Improve popupwarning by preventing interactions while requests are be…
soupette Jun 30, 2020
f86a3c3
Fix CM loading state
soupette Jun 30, 2020
7e4d7b1
Fix validations
soupette Jun 30, 2020
970273a
Fix validations
soupette Jun 30, 2020
49962d6
Handle API errors
soupette Jun 30, 2020
e1a2c93
Add duplicate role
soupette Jul 1, 2020
3c13a85
Fix format data to API : Empty fields to null
HichamELBSI Jul 1, 2020
102633f
Fix edit super admin role for ce
soupette Jul 1, 2020
2f388d4
Fix schema
soupette Jul 1, 2020
b6a5e78
fix bad nesting
petersg83 Jul 1, 2020
5bbdccc
Created UpgradePlan modal
soupette Jul 1, 2020
cc8944c
Add upgrade plan
soupette Jul 1, 2020
30bf4c2
Add trads
soupette Jul 1, 2020
4c62a40
Fix modal upgrade plan
soupette Jul 2, 2020
cd9c7fd
Add conditions modal
HichamELBSI Jun 29, 2020
0b74aa9
Handle conditions
HichamELBSI Jul 1, 2020
ed3a8a6
Fix PR review
HichamELBSI Jul 2, 2020
c5faa49
Fix select styles
soupette Jul 2, 2020
4a78d51
Fix propname
soupette Jul 2, 2020
b181421
clean permissions fields in DB at startup
petersg83 Jul 1, 2020
4a106ee
separate withIntermediate
petersg83 Jul 3, 2020
b769afb
update jsdoc
petersg83 Jul 3, 2020
9991416
Fix Error display
soupette Jul 2, 2020
453a389
Update Relation API endpoint
soupette Jul 2, 2020
ebc8704
Connect to the backend
soupette Jul 2, 2020
a1163f2
Fix updates when unmounted
soupette Jul 2, 2020
df3346f
Fix permissions
soupette Jul 3, 2020
0fd8100
Fix redirection
soupette Jul 3, 2020
7279f13
Fix dz and nested components
soupette Jul 3, 2020
3a94a17
Fix dz read mode
soupette Jul 3, 2020
842f78d
Only display allowed filters
soupette Jul 3, 2020
b847fff
Fix select styles
soupette Jul 3, 2020
0564159
Fix some UI
HichamELBSI Jul 6, 2020
d6536ba
handle fields null for delete perm
petersg83 Jul 3, 2020
f5a0308
filter instead of slice
petersg83 Jul 3, 2020
4d4c767
refacto
petersg83 Jul 3, 2020
96c68df
simplify validator
petersg83 Jul 6, 2020
b7686d0
Fix validations for users
soupette Jul 6, 2020
5da5870
Fix readonly state components design
soupette Jul 6, 2020
b659ae6
Add readonly mode for users
soupette Jul 6, 2020
e139c90
Upgrade buffet.js
soupette Jul 6, 2020
df711de
Upgrade tests
soupette Jul 6, 2020
9267674
prepare code for migration
petersg83 Jul 6, 2020
2be4f80
migrate users for new column isActive
petersg83 Jul 6, 2020
a9e7202
Fix checkbox label color
HichamELBSI Jul 6, 2020
8f531f0
Fix ui
soupette Jul 7, 2020
26713b6
Fix delete in upload plugin
soupette Jul 7, 2020
4edad86
Add basic created_by updated_by
alexandrebodin Jun 29, 2020
85ea0ab
Add condition
alexandrebodin Jun 29, 2020
b3f602d
Rework policies resolving (allow policy generators) / Add hasPermissi…
Convly Jun 18, 2020
241fb23
Removes useless async from hasPermissions ability
Convly Jun 18, 2020
11ba971
Rework policy handling, add util to create policy factories, allow ar…
Convly Jun 19, 2020
b5fb5f8
Add permissions to the content-manager routes
Convly Jun 29, 2020
8b81395
Fix filename typo
Convly Jun 29, 2020
25c04c8
Fix actions name typo
Convly Jun 29, 2020
8f7da96
Add plugins::content-manager.hasPermissions policy
Convly Jun 29, 2020
c11e6df
Use AbilityBuilder instead of defineAbility, fix content-manager::cre…
Convly Jun 30, 2020
f2eb3c5
Use AbilityBuilder instead of defineAbility, fix content-manager::cre…
Convly Jun 30, 2020
20f80b2
Better permissions-manager.sanitize behavior
Convly Jul 1, 2020
46f0c87
Handle $or operation on pm query, better parsing for the query
Convly Jul 1, 2020
36facdf
Add new sanitize-entity.js
Convly Jul 1, 2020
e8063ce
Add relation-list route in the CM
alexandrebodin Jul 1, 2020
56d583e
Add basis for upload controllers permissions
Convly Jul 2, 2020
29fcf7c
Clean find relation list and tests
alexandrebodin Jul 2, 2020
c31c86c
Allow compo option
alexandrebodin Jul 2, 2020
5f01d9e
Add permissions on upload controller
Convly Jul 2, 2020
44a7e23
Update findOne
alexandrebodin Jul 2, 2020
3ff5f64
Add single type usecase and fix delete
alexandrebodin Jul 2, 2020
1b460c7
Fix find relation list for compo
alexandrebodin Jul 2, 2020
cdc9bc2
Allow multiple args in policies
alexandrebodin Jul 2, 2020
8109af1
Handle specific find case of ST
alexandrebodin Jul 2, 2020
097c7f4
Add sanitize
alexandrebodin Jul 2, 2020
0e61698
Fix upload w/ permissions bugs
Convly Jul 2, 2020
647b5a2
Remove useless check
Convly Jul 2, 2020
3953e50
Add descriptive comment for hasPermissions transformers
Convly Jul 2, 2020
1c90614
Fix sanitizeEntity
alexandrebodin Jul 2, 2020
9cce014
Fix elemMatch op bug (typo)
Convly Jul 6, 2020
91bd428
Fix permissions-manager query generation
Convly Jul 6, 2020
a300e35
Removes the plugins::users-permissions.user subject from editor & aut…
Convly Jul 6, 2020
8797d25
Add hasPermissions policy to concerned routes
Convly Jul 6, 2020
e63306b
Rewrote users-permissions's controller to fit with rbac, fix various …
Convly Jul 6, 2020
0cf7672
Add missing subject on upload permissions
Convly Jul 6, 2020
c9ebae4
Fix authorization issues due to null subject registration
Convly Jul 7, 2020
31d748f
Add private to User.settings::blocked
Convly Jul 7, 2020
5c6851e
Update naming of permissions
alexandrebodin Jul 7, 2020
9ec4c9e
Exclude creator in fields perm
alexandrebodin Jul 7, 2020
4e71345
Fix check API call
soupette Jul 7, 2020
aaab4c1
Fix WYSIWYG and JSON inputs disabled state
soupette Jul 7, 2020
9e1ac1b
Fix error message in CM when deleting an entry
soupette Jul 7, 2020
7222820
Fix delete forbidden in CM
soupette Jul 7, 2020
8074c5e
Fox some UI bugs
HichamELBSI Jul 7, 2020
61540b6
Fix filters
soupette Jul 7, 2020
ba5f127
fix clean permission
alexandrebodin Jul 7, 2020
aaa4192
Fix default ML permissions
alexandrebodin Jul 7, 2020
f424bdf
Fix conditions bullet behavior & UI issues
HichamELBSI Jul 7, 2020
5b4b95d
Add check
alexandrebodin Jul 1, 2020
11fd34a
Cleanup
alexandrebodin Jul 1, 2020
76544f5
fix expire_at
alexandrebodin Jul 1, 2020
2ff0bfe
update key name
alexandrebodin Jul 3, 2020
a7d8889
Add telemtry
alexandrebodin Jul 3, 2020
73ad654
Add hashes
alexandrebodin Jul 6, 2020
2947604
Feedback
alexandrebodin Jul 8, 2020
6d2c50c
Log strapi edition type to the console on startup
Convly Jul 8, 2020
d692a61
Fix AuthPage conflicts
soupette Jul 8, 2020
7833566
Fix conflict helper => hasPermissions.js
soupette Jul 8, 2020
634b80c
Fix unit test back
alexandrebodin Jul 8, 2020
91b42ed
Fix rebase errors front
HichamELBSI Jul 8, 2020
286305f
Merge pull request #105 from strapi/rbac/post-rebase
soupette Jul 8, 2020
db4f0cf
Merge pull request #104 from strapi/chore/fix-rebase
soupette Jul 8, 2020
109e41e
Fix e2e tests
alexandrebodin Jul 8, 2020
085f257
Merge branch 'feature/rbac-licensed' of github.com:strapi/strapi-priv…
alexandrebodin Jul 8, 2020
4dba7a6
Upgrade buffet.js
soupette Jul 8, 2020
b328025
Fix snapshots
soupette Jul 8, 2020
41c8db9
Fix dot position
soupette Jul 8, 2020
764fb86
Merge pull request #106 from strapi/chore/upgrade-buffetjs
soupette Jul 8, 2020
38d67fc
Fix mongo issues
alexandrebodin Jul 8, 2020
eb181bb
Merge branch 'feature/rbac-licensed' of github.com:strapi/strapi-priv…
alexandrebodin Jul 8, 2020
9ec714f
Disallow disabling last super admin
alexandrebodin Jul 8, 2020
f2d449a
Merge pull request #107 from strapi/chore/disallow-disabling-last-sup…
alexandrebodin Jul 8, 2020
cfb5631
Remove empty root ee folder
alexandrebodin Jul 8, 2020
b62cb70
Fix trads refresh
soupette Jul 8, 2020
5a7ccdb
Fix license txt
alexandrebodin Jul 8, 2020
7a68849
Merge pull request #108 from strapi/fix/cm-trads-refresh
soupette Jul 8, 2020
7c52b2d
Move front EE folder
HichamELBSI Jul 8, 2020
dca59f2
Merge pull request #109 from strapi/rbac-licensed/move-front-ee
soupette Jul 8, 2020
8ccc6ae
Copy ee folder only for admin
soupette Jul 8, 2020
970c044
Merge pull request #110 from strapi/fix/copy
HichamELBSI Jul 8, 2020
e0dde4c
Add license.txt to default gitignore
alexandrebodin Jul 8, 2020
8ec5a17
Fix CE roles edition
soupette Jul 9, 2020
251646e
Add delete action
soupette Jul 9, 2020
c680392
Merge pull request #111 from strapi/fix/ui-bugs
HichamELBSI Jul 9, 2020
8d92bf8
Add min validator
alexandrebodin Jul 9, 2020
e46b56e
Clean models
soupette Jul 10, 2020
59526ff
Fix some light issues in permissions-manager & engine
Convly Jul 10, 2020
60b571d
Merge pull request #6967 from strapi/rbac/fix-permissions-issues
alexandrebodin Jul 10, 2020
3f4f555
Clean code
soupette Jul 15, 2020
90407f6
Upgrade buffet.js
soupette Jul 15, 2020
80c7d38
Reorder translation files by key value and add script to remove the u…
soupette Jul 15, 2020
58bd1de
Remove old trads in admin/en.json
soupette Jul 15, 2020
c57108f
Remove old trads in strapi-admin
soupette Jul 15, 2020
ce10f61
Fix util
soupette Jul 15, 2020
cd55915
Rename file
soupette Jul 15, 2020
2ee8207
Fixes #6051
soupette Jul 15, 2020
b3ec0c3
Clean files
soupette Jul 15, 2020
9347083
Fix PR feedback
soupette Jul 16, 2020
afae5b8
Add syntax highlight in preview wysiwyg
soupette Jul 15, 2020
12170ff
Change theme
soupette Jul 16, 2020
615dffd
Merge pull request #7022 from strapi/chore/clean-trads
alexandrebodin Jul 16, 2020
c73aadb
add batch delete for users
petersg83 Jul 15, 2020
57501ba
count instead of find
petersg83 Jul 16, 2020
b341b2f
use batch-delete users instead of deleteOne in front
petersg83 Jul 16, 2020
066221f
init migration guide to 3.1.x
petersg83 Jul 10, 2020
3c5ae17
fix typos + add tip to generate a JWT token
petersg83 Jul 15, 2020
2108c0c
better explain how to generate jwt token
petersg83 Jul 16, 2020
529833c
Merge branch 'features/rbac' of github.com:strapi/strapi into chore/f…
soupette Jul 16, 2020
d62de6e
Merge pull request #6968 from strapi/rbac/documentation
alexandrebodin Jul 16, 2020
7b070ee
Merge pull request #7023 from strapi/rbac/deleteManyUsers
alexandrebodin Jul 16, 2020
b71ffa6
Merge branch 'master' into features/rbac
alexandrebodin Jul 16, 2020
990dc43
Fix users list design
soupette Jul 16, 2020
dd023c3
Merge pull request #7026 from strapi/chore/fix-wysiwyg-preview
soupette Jul 16, 2020
4e0ff23
Change preview for markdown-it in order to have all md support
soupette Jul 16, 2020
e68f8d0
Add _where parameter OR and AND doc v1
alexandrebodin Jul 16, 2020
012d07c
Merge pull request #7038 from strapi/rbac/filter-doc
alexandrebodin Jul 16, 2020
7b1e75a
Add tip support
soupette Jul 17, 2020
35cccd4
Add tests for strapi-admin/services (especially on /permissions/). So…
Convly Jul 16, 2020
cf56735
Make better use of flatMap for hasAtLeastOneRegisteredField condition
Convly Jul 17, 2020
11afd28
Allow name edition in CE
soupette Jul 17, 2020
3c71278
Merge pull request #7032 from strapi/rbac/admin-tests
alexandrebodin Jul 18, 2020
6bafa35
Merge branch 'releases/3.1.0' into features/rbac
alexandrebodin Jul 18, 2020
9b7c360
update lock file
alexandrebodin Jul 18, 2020
71d9284
Disable super admin role edition
soupette Jul 20, 2020
27a19dc
Fixes #6520
soupette Jul 20, 2020
138f3bd
Upgrade buffet.js
soupette Jul 20, 2020
9138034
Make admin role not editable at all
alexandrebodin Jul 20, 2020
9ba69f6
Disable super admin role edition
soupette Jul 20, 2020
f4dfe8c
Merge branch 'fix/ce-allow-role-name-edition' of github.com:strapi/st…
alexandrebodin Jul 20, 2020
47de085
Merge pull request #7046 from strapi/fix/ce-allow-role-name-edition
alexandrebodin Jul 20, 2020
6baa8db
Merge pull request #7041 from strapi/chore/markdown-it
alexandrebodin Jul 20, 2020
f47b781
Change pricing page url
soupette Jul 20, 2020
9983d3b
clean conditions at get and update
petersg83 Jul 20, 2020
62b2192
Update license info
alexandrebodin Jul 20, 2020
e0ee773
Merge pull request #7084 from strapi/chore/update-license-info
alexandrebodin Jul 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc.front.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
},
},
rules: {
'import/no-unresolved': 0,
'generator-star-spacing': 0,
'no-console': 0,
'require-atomic-updates': 0,
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const frontPaths = [
'packages/**/admin/src/**/**/*.js',
'packages/**/ee/admin/**/**/*.js',
'packages/strapi-helper-plugin/**/*.js',
'packages/**/test/front/**/*.js',
'test/config/front/**/*.js',
Expand Down
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2015-present Strapi Solutions SAS

Portions of the Strapi software are licensed as follows:

* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE".

* All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.

MIT Expat License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 0 additions & 7 deletions LICENSE.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ module.exports = {
'/v3.x/admin-panel/customization',
'/v3.x/admin-panel/custom-webpack-config',
'/v3.x/admin-panel/deploy',
'/v3.x/admin-panel/forgot-password',
],
},
{
Expand Down
48 changes: 48 additions & 0 deletions docs/v3.x/admin-panel/forgot-password.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Forgot Password Email

## Customize forgot password email

You may want to customize the forgot password email.
You can do it by providing your own template (formatted as a [lodash template](https://lodash.com/docs/4.17.15#template)).

The template will be compiled with the following variables: `url`, `user.email`, `user.username`, `user.firstname`, `user.lastname`.

### Example

**Path -** `./config/servers.js`

```js
const forgotPasswordTemplate = require('./email-templates/forgot-password');

module.exports = ({ env }) => ({
// ...
admin: {
// ...
forgotPassword: {
from: 'support@mywebsite.fr',
replyTo: 'support@mywebsite.fr',
emailTemplate: forgotPasswordTemplate,
},
// ...
},
// ...
});
```

**Path -** `./config/email-templates/forgot-password.js`

```js
const subject = `Reset password`;

const html = `<p>Hi <%= user.firstname %></p>
<p>Sorry you lost your password. You can click here to reset it: <%= url %></p>`;

const text = `Hi <%= user.firstname %>
Sorry you lost your password. You can click here to reset it: <%= url %>`;

module.exports = {
subject,
text,
html,
};
```
35 changes: 19 additions & 16 deletions docs/v3.x/concepts/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,25 @@ module.exports = ({ env }) => ({
```

**Available options**

| Property | Description | Type | Default |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ----------- |
| `host` | Host name | string | `localhost` |
| `port` | Port on which the server should be running. | integer | `1337` |
| `emitErrors` | Enable errors to be emitted to `koa` when they happen in order to attach custom logic or use error reporting services. | boolean | `false` |
| `url` | Url of the server. Enable proxy support such as Apache or Nginx, example: `https://mywebsite.com/api`. The url can be relative, if so, it is used with `http://${host}:${port}` as the base url. | string | `''` |
| `cron` | Cron configuration (powered by [`node-schedule`](https://github.com/node-schedule/node-schedule)) | Object | |
| `cron.enabled` | Enable or disable CRON tasks to schedule jobs at specific dates. | boolean | `false` |
| `admin` | Admin panel configuration | Object | |
| `admin.url` | Url of your admin panel. Default value: `/admin`. Note: If the url is relative, it will be concatenated with `url`. | string | `/admin` |
| `admin.autoOpen` | Enable or disabled administration opening on start. | boolean | `true` |
| `admin.watchIgnoreFiles` | Add custom files that should not be watched during development. See more [here](https://github.com/paulmillr/chokidar#path-filtering) (property `ignored`). | Array(string) | `[]` |
| `admin.host` | Use a different host for the admin panel. Only used along with `strapi develop --watch-admin` | string | `localhost` |
| `admin.port` | Use a different port for the admin panel. Only used along with `strapi develop --watch-admin` | string | `8000` |
| `admin.serveAdminPanel` | If false, the admin panel won't be served. Note: the `index.html` will still be served, see [defaultIndex option](./middlewares#global-middlewares) | boolean | `true` |
| Property | Description | Type | Default |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `host` | Host name | string | `localhost` |
| `port` | Port on which the server should be running. | integer | `1337` |
| `emitErrors` | Enable errors to be emitted to `koa` when they happen in order to attach custom logic or use error reporting services. | boolean | `false` |
| `url` | Url of the server. Enable proxy support such as Apache or Nginx, example: `https://mywebsite.com/api`. The url can be relative, if so, it is used with `http://${host}:${port}` as the base url. | string | `''` |
| `cron` | Cron configuration (powered by [`node-schedule`](https://github.com/node-schedule/node-schedule)) | Object | |
| `cron.enabled` | Enable or disable CRON tasks to schedule jobs at specific dates. | boolean | `false` |
| `admin` | Admin panel configuration | Object | |
| `admin.url` | Url of your admin panel. Default value: `/admin`. Note: If the url is relative, it will be concatenated with `url`. | string | `/admin` |
| `admin.autoOpen` | Enable or disabled administration opening on start. | boolean | `true` |
| `admin.watchIgnoreFiles` | Add custom files that should not be watched during development. See more [here](https://github.com/paulmillr/chokidar#path-filtering) (property `ignored`). | Array(string) | `[]` |
| `admin.host` | Use a different host for the admin panel. Only used along with `strapi develop --watch-admin` | string | `localhost` |
| `admin.port` | Use a different port for the admin panel. Only used along with `strapi develop --watch-admin` | string | `8000` |
| `admin.serveAdminPanel` | If false, the admin panel won't be served. Note: the `index.html` will still be served, see [defaultIndex option](./middlewares#global-middlewares) | boolean | `true` |
| `admin.forgotPassword` | Settings to customize the forgot password email (see more here: [Forgot Password Email](../admin-panel/forgot-password)) | Object | {} |
| `admin.forgotPassword.emailTemplate` | Email template as defined in [email plugin](../plugins/email#create-an-email-from-a-template-fillemailoptions) | Object | [Default template](https://github.com/strapi/strapi/tree/master/packages/strapi-admin/config/email-templates/forgot-password.js) |
| `admin.forgotPassword.from` | Sender mail address | string | Default value defined in your [provider configuration](../plugins/email#configure-your-provider) |
| `admin.forgotPassword.replyTo` | Default address or addresses the receiver is asked to reply to | string | Default value defined in your [provider configuration](../plugins/email#configure-your-provider) |

## Functions

Expand Down
2 changes: 0 additions & 2 deletions docs/v3.x/guides/registering-a-field-in-admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ export default strapi => {
injectedComponents: [],
isReady: true,
isRequired: pluginPkg.strapi.required || false,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
Expand Down
62 changes: 60 additions & 2 deletions docs/v3.x/plugin-development/frontend-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,73 @@ Here are its properties:
| initializer | node | Refer to the [Initializer documentation](#initializer) |
| injectedComponents | array | Refer to the [Injected Component documentation](#injected-components) |
| isReady | boolean | The app will load until this proprety is true |
| leftMenuLinks | array | Array of links to inject in the menu |
| mainComponent | node | The plugin's App container, setting it to null will prevent the plugin from being displayed in the menu |
| mainComponent | node | The plugin's App container, |
| menu | object | Define where the link of your plugin will be set. Without this your plugin will not display a link in the left menu |
| name | string | The plugin's name retrieved from the package.json |
| pluginLogo | file | The plugin's logo |
| preventComponentRendering | boolean | Whether or not display the plugin's blockerComponent instead of the main component |
| settings | object | Refer to the [Plugins settings API](./frontend-settings-api.md) |
| reducers | object | The plugin's redux reducers |
| trads | object | The plugin's translation files |

### Displaying the plugin's link in the main menu

To display a plugin link into the main menu the plugin needs to export a menu object.

**Path —** `plugins/my-plugin/admin/src/index.js`.

```js
import pluginPkg from '../../package.json';
import pluginLogo from './assets/images/logo.svg';
import App from './containers/App';
import lifecycles from './lifecycles';
import trads from './translations';
import pluginId from './pluginId';

export default strapi => {
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
const icon = pluginPkg.strapi.icon;
const name = pluginPkg.strapi.name;
const plugin = {
blockerComponent: null,
blockerComponentProps: {},
description: pluginDescription,
icon,
id: pluginId,
initializer: null,
isRequired: pluginPkg.strapi.required || false,
layout: null,
lifecycles,
mainComponent: App,
name,
pluginLogo,
preventComponentRendering: false,
trads,
menu: {
// Set a link into the PLUGINS section
pluginsSectionLinks: [
{
destination: `/plugins/${pluginId}`, // Endpoint of the link
icon,
label: {
id: `${pluginId}.plugin.name`, // Refers to a i18n
defaultMessage: 'My PLUGIN',
},
name,
// If the plugin has some permissions on whether or not it should be accessible
// depending on the logged in user's role you can set them here.
// Each permission object performs an OR comparison so if one matches the user's ones
// the link will be displayed
permissions: [{ action: 'plugins::content-type-builder.read', subject: null }],
},
],
},
};

return strapi.registerPlugin(plugin);
};
```

### Initializer

The component is generated by default when you create a new plugin. Use this component to execute some logic when the app is loading. When the logic has been executed this component should emit the `isReady` event so the user can interact with the application.
Expand Down
4 changes: 0 additions & 4 deletions docs/v3.x/plugin-development/frontend-field-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export default strapi => {
initializer: () => null,
injectedComponents: [],
isReady: true,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
Expand Down Expand Up @@ -141,8 +139,6 @@ export default strapi => {
isRequired: pluginPkg.strapi.required || false,
layout: null,
lifecycles,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: App,
name: pluginPkg.strapi.name,
pluginLogo,
Expand Down
33 changes: 17 additions & 16 deletions docs/v3.x/plugin-development/frontend-settings-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default strapi => {
title: 'Setting page 1',
to: `${strapi.settingsBaseURL}/${pluginId}/setting1`,
name: 'setting1',
permissions: [{ action: 'plugins::my-plugin.action-name', subject: null }], // This key is not mandatory it can be null, undefined or an empty array
},
{
// Using i18n with a corresponding translation key
Expand All @@ -51,6 +52,8 @@ export default strapi => {
},
to: `${strapi.settingsBaseURL}/${pluginId}/setting2`,
name: 'setting2',
// Define a specific component if needed:
Component: () => <div />,
},
],
};
Expand All @@ -64,8 +67,6 @@ export default strapi => {
initializer: () => null,
injectedComponents: [],
isReady: true,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
Expand Down Expand Up @@ -147,6 +148,7 @@ export default strapi => {
title: 'Setting page 1',
to: `${strapi.settingsBaseURL}/${pluginId}/setting1`,
name: 'setting1',
permissions: [{ action: 'plugins::my-plugin.action-name', subject: null }],
},
{
title: {
Expand All @@ -168,8 +170,6 @@ export default strapi => {
initializer: () => null,
injectedComponents: [],
isReady: true,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
Expand Down Expand Up @@ -233,23 +233,24 @@ export default strapi => {
initializer: () => null,
injectedComponents: [],
isReady: true,
leftMenuLinks: [],
leftMenuSections: [],
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
settings: {
// Add a link into the global section of the settings view
global: [
{
title: 'Setting link 1',
to: `${strapi.settingsBaseURL}/setting-link-1`,
name: 'settingLink1',
Component: SettingLink,
// Bool : https://reacttraining.com/react-router/web/api/Route/exact-bool
exact: false,
},
],
global: {
links: [
{
title: 'Setting link 1',
to: `${strapi.settingsBaseURL}/setting-link-1`,
name: 'settingLink1',
Component: SettingLink,
// Bool : https://reacttraining.com/react-router/web/api/Route/exact-bool
exact: false,
permissions: [{ action: 'plugins::my-plugin.action-name', subject: null }],
},
],
},
mainComponent: Settings,
menuSection,
},
Expand Down