owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.36k stars 174 forks source link

[Sharing-NG] can't get sharing permission for a resource #9541

Closed nirajacharya2 closed 1 month ago

nirajacharya2 commented 2 months ago

Describe the bug

I can not get permission of a particular share using both root and permissions endpoint. which should be possible according to the api specifications on: https://owncloud.dev/libre-graph-api/#/drives.permissions/GetPermission https://owncloud.dev/libre-graph-api/#/drives.root/GetPermissionSpaceRoot

Steps to reproduce

  1. create a link share of a resource
    curl -k -XPOST https://localhost:9200/graph/v1beta1/drives/{drive-id}/items/{item-id}/createLink -uadmin:admin
  2. get sharing permission for that resource
    curl -k -XGET https://localhost:9200/graph/v1beta1/drives/{drive-id}/items/{item-id}/permissions/{permission-id} -uadmin:admin

Expected behavior

The request should given the permission of the share

Actual behavior

The request gives 405 status code

< HTTP/1.1 405 Method Not Allowed
< Allow: PATCH
< Allow: DELETE

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

```console ownCloud Web UI 9.1.0-alpha.1 Infinite Scale 6.0.0+aa6041abb6 Community ```

Additional context

Add any other context about the problem here.

saw-jan commented 1 month ago

endpoints are listed but not working: (405 Method Not Allowed)

https://owncloud.dev/libre-graph-api/#/drives.permissions/GetPermission https://owncloud.dev/libre-graph-api/#/drives.root/GetPermissionSpaceRoot

CC @micbar @rhafer

2403905 commented 1 month ago

The endpoint is not implemented. We can retrieve the item permission via https://owncloud.dev/libre-graph-api/#/drives.permissions/ListPermissions

rhafer commented 1 month ago

Duplicate of #8616