Skip to content

Commit

Permalink
Merge pull request #6220 from 4teamwork/nj_sharing
Browse files Browse the repository at this point in the history
Add documentation for sharing endpoint.
  • Loading branch information
Niklaus Johner authored Jan 30, 2020
2 parents a3d33d8 + 9c4554e commit 8eebfc2
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ Changelog
2020.1.0rc2 (unreleased)
------------------------

- Nothing changed yet.
- Add documentation for sharing endpoint. [njohner]


2020.1.0rc1 (2020-01-30)
------------------------

- Fix JS ordering issue: define overlayhelpers.js position. [njohner]
- Add French API and admin documentations. [njohner]
- Fix volatile related proposal documents. [elioschmutz]
- Add a button to create a task from a proposal. [elioschmutz]
- Allow to unlock and edit submitted documents in a submitted proposal. [elioschmutz]
Expand Down
1 change: 1 addition & 0 deletions docs/public/dev-manual/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Inhalt:
proposals.rst
reminder.rst
journal.rst
sharing.rst
workspace/index
examples/index.rst
docs_changelog.rst
Expand Down
53 changes: 53 additions & 0 deletions docs/public/dev-manual/api/sharing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Sharing
=======

Die lokalen Rollen können mit dem ``@sharing`` Endpoint abgefragt werden. Um die lokalen Rollen aufzulisten, wenn man keine Berechtigungen zum Bearbeiten hat, muss man den Parameter `ignore_permissions=True` setzen.

**Beispiel-Request**:

GET /ordnungssystem/fuehrung/dossier-23/@sharing?ignore_permissions=True HTTP/1.1
Accept: application/json


**Beispiel-Response**:

.. sourcecode:: http

HTTP/1.1 201 Created
Accept: application/json

{
"available_roles": [
{
"id": "Reader",
"title": "Lesen"
},
{
"id": "Contributor",
"title": "Hinzufügen"
}
],
"entries": [
{
"automatic_roles": {
"Contributor": false,
"Reader": false
},
"computed_roles": {
"Contributor": "acquired",
"Reader": "acquired"
},
"disabled": false,
"id": "og_demo-ftw_users",
"login": null,
"roles": {
"Contributor": false,
"Reader": false
},
"title": "og_demo-ftw_users",
"type": "group",
"url": "http://localhost:8080/fd/@@list_groupmembers?group=og_demo-ftw_users"
}
],
"inherit": true
}
2 changes: 1 addition & 1 deletion opengever/api/sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SharingGet(APISharingGet):
Disable `plone.DelegateRoles` permission check, all users should be
able to access sharing informations.
Add additional request parameter `ignore_permission`, which is used for
Add additional request parameter `ignore_permissions`, which is used for
readonly listings of the current local roles, as it's done in the sharing
tab.
"""
Expand Down

0 comments on commit 8eebfc2

Please sign in to comment.