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

Add documentation for sharing endpoint. #6220

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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