Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into unify-expired-and-excluded-items-handling
- Loading branch information
Showing
37 changed files
with
984 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
/.Python | ||
/include | ||
/lib | ||
/local | ||
/.mr.developer.cfg | ||
*.mo | ||
docs/Makefile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
GET /plone/@controlpanels HTTP/1.1 | ||
Accept: application/json | ||
Authorization: Basic YWRtaW46c2VjcmV0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
[ | ||
{ | ||
"@id": "http://localhost:55001/plone/@controlpanels/mail", | ||
"group": "General", | ||
"title": "Mail" | ||
}, | ||
{ | ||
"@id": "http://localhost:55001/plone/@controlpanels/editing", | ||
"group": "Content", | ||
"title": "Editing" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
GET /plone/@controlpanels/editing HTTP/1.1 | ||
Accept: application/json | ||
Authorization: Basic YWRtaW46c2VjcmV0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"@id": "http://localhost:55001/plone/@controlpanel/editing", | ||
"data": { | ||
"available_editors": [ | ||
"TinyMCE", | ||
"None" | ||
], | ||
"default_editor": "TinyMCE", | ||
"enable_link_integrity_checks": true, | ||
"ext_editor": false, | ||
"lock_on_ttw_edit": true | ||
}, | ||
"group": "Content", | ||
"schema": { | ||
"fieldsets": [ | ||
{ | ||
"fields": [ | ||
"available_editors", | ||
"default_editor", | ||
"ext_editor", | ||
"enable_link_integrity_checks", | ||
"lock_on_ttw_edit" | ||
], | ||
"id": "default", | ||
"title": "Default" | ||
} | ||
], | ||
"properties": { | ||
"available_editors": { | ||
"additionalItems": true, | ||
"default": [ | ||
"TinyMCE", | ||
"None" | ||
], | ||
"description": "Available editors in the portal.", | ||
"items": { | ||
"description": "", | ||
"title": "", | ||
"type": "string" | ||
}, | ||
"title": "Available editors", | ||
"type": "array", | ||
"uniqueItems": false | ||
}, | ||
"default_editor": { | ||
"choices": [ | ||
[ | ||
"TinyMCE", | ||
"TinyMCE" | ||
], | ||
[ | ||
"None", | ||
"None" | ||
] | ||
], | ||
"default": "TinyMCE", | ||
"description": "Select the default wysiwyg editor. Users will be able to choose their own or select to use the site default.", | ||
"enum": [ | ||
"TinyMCE", | ||
"None" | ||
], | ||
"enumNames": [ | ||
"TinyMCE", | ||
"None" | ||
], | ||
"title": "Default editor", | ||
"type": "string" | ||
}, | ||
"enable_link_integrity_checks": { | ||
"default": true, | ||
"description": "Determines if the users should get warnings when they delete or move content that is linked from inside the site.", | ||
"title": "Enable link integrity checks", | ||
"type": "boolean" | ||
}, | ||
"ext_editor": { | ||
"default": false, | ||
"description": "Determines if the external editor feature is enabled. This feature requires a special client-side application installed. The users also have to enable this in their preferences.", | ||
"title": "Enable External Editor feature", | ||
"type": "boolean" | ||
}, | ||
"lock_on_ttw_edit": { | ||
"default": true, | ||
"description": "Disabling locking here will only affect users editing content through the Plone web UI. Content edited via WebDAV clients will still be subject to locking.", | ||
"title": "Enable locking for through-the-web edits", | ||
"type": "boolean" | ||
} | ||
}, | ||
"required": [ | ||
"available_editors", | ||
"default_editor" | ||
], | ||
"type": "object" | ||
}, | ||
"title": "Editing" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PATCH /plone/@controlpanels/editing HTTP/1.1 | ||
Accept: application/json | ||
Authorization: Basic YWRtaW46c2VjcmV0 | ||
Content-Type: application/json | ||
|
||
{ | ||
"default_editor": "CKeditor", | ||
"ext_editor": true | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Control Panels | ||
============== | ||
|
||
Control panels in Plone allow you to configure the global site setup of a | ||
Plone site. The @controlpanels endpoint in plone.restapi allows you to list | ||
all existing control panels in a Plone site and to retrieve or edit the | ||
settings of a specific control panel. | ||
|
||
Most of the settings in the Plone control panels are based on plone.registry (since Plone 5.x). Therefore you can also use the @registry endpoint to | ||
retrieve or manipulate site settings. The @controlpanels endpoint just gives | ||
developers are more a convenience way of accessing the settings and makes it | ||
easier to render control panels on the front-end. | ||
|
||
|
||
.. note:: This is currently only implemented for Plone 5. | ||
|
||
|
||
Listing Control Panels | ||
---------------------- | ||
|
||
A list of all existing control panels in the portal can be retrieved by | ||
sending a GET request to the @controlpanels endpoint: | ||
|
||
.. http:example:: curl httpie python-requests | ||
:request: _json/controlpanels_get.req | ||
|
||
Response: | ||
|
||
.. literalinclude:: _json/controlpanels_get.resp | ||
:language: http | ||
|
||
The following fields are returned: | ||
|
||
- @id: hypermedia link to the control panel | ||
- title: the title of the control panel | ||
- group: the group where the control panel should show up (e.g. General, Content, Users, Security, Advanced, Add-on Configuration) | ||
|
||
|
||
Retrieve a single Control Panel | ||
------------------------------- | ||
|
||
To retrieve a single control panel, send a GET request to the URL of the | ||
control panel: | ||
|
||
.. http:example:: curl httpie python-requests | ||
:request: _json/controlpanels_get_item.req | ||
|
||
Response: | ||
|
||
.. literalinclude:: _json/controlpanels_get_item.resp | ||
:language: http | ||
|
||
|
||
The following fields are returned: | ||
|
||
- @id: hypermedia link to the control panel | ||
- title: title of the control panel | ||
- group: group name of the control panel | ||
- schema: JSON Schema of the control panel | ||
- data: current values of the control panel | ||
|
||
|
||
Updating a Control Panel with PATCH | ||
----------------------------------- | ||
|
||
To update the settings on a control panel send a PATCH request to control panel | ||
resource: | ||
|
||
.. http:example:: curl httpie python-requests | ||
:request: _json/controlpanels_patch.req | ||
|
||
A successful response to a PATCH request will be indicated by a :term:`204 No Content` response: | ||
|
||
HTTP/1.1 204 No Content | ||
|
||
.. literalinclude:: _json/controlpanels_patch.resp | ||
:language: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ Contents | |
searching | ||
tusupload | ||
vocabularies | ||
controlpanels | ||
customization | ||
conventions | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.