Repository navigation
enhancement: add graph beta listPermissions endpoint - #7753
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
As far as I understand Also according to the specs its |
Seems the example in the spec is wrong. The schema for the |
besides the new api endpoint it includes several utilities to simplify the graph api development. * resolve drive and item id from the request path * generic pointer and value utilities * space root detection
|
Kudos, SonarCloud Quality Gate passed! |
* enhancement: add graph beta listPermissions endpoint besides the new api endpoint it includes several utilities to simplify the graph api development. * resolve drive and item id from the request path * generic pointer and value utilities * space root detection * update GetDriveAndItemIDParam signature to return a error * move errorcode package * enhancement: add generic error code handling * fix: rebase
* enhancement: add graph beta listPermissions endpoint besides the new api endpoint it includes several utilities to simplify the graph api development. * resolve drive and item id from the request path * generic pointer and value utilities * space root detection * update GetDriveAndItemIDParam signature to return a error * move errorcode package * enhancement: add generic error code handling * fix: rebase
* enhancement: add graph beta listPermissions endpoint besides the new api endpoint it includes several utilities to simplify the graph api development. * resolve drive and item id from the request path * generic pointer and value utilities * space root detection * update GetDriveAndItemIDParam signature to return a error * move errorcode package * enhancement: add generic error code handling * fix: rebase
* enhancement: add graph beta listPermissions endpoint besides the new api endpoint it includes several utilities to simplify the graph api development. * resolve drive and item id from the request path * generic pointer and value utilities * space root detection * update GetDriveAndItemIDParam signature to return a error * move errorcode package * enhancement: add generic error code handling * fix: rebase








Description
implement graph listPermissions endpoint according to the spec.
the current implementation is an optimistic approach and needs discussions for the expected behaviour.
the following points are unclear or need further fine-tuning:
@libre.graph.permissions.roles.allowedValues, use of CS3ResourcePermissionsToUnifiedRole- yesresult.value, to contain public links or not (currently contained)swagger spec return value vs ms spec (- CollectionOfPermissionsWithAllowedValuescollectionOfPermissionsorListResponse)display- no@libre.graph.permissions.roles.allowedValues.*.rolePermissionsor notmeaning of@libre.graph.permissions.roles.allowedValues.*.weightin that contextToDo
Related Issue
Motivation and Context
listing share (drive) permissions is part of our openAPI and ms graph spec, this is needed for the ocs to graph migratioin.
How Has This Been Tested?
Example:
Request
Response (owner)
{ "@libre.graph.permissions.actions.allowedValues": [ "libre.graph/driveItem/permissions/create", "libre.graph/driveItem/children/create", "libre.graph/driveItem/standard/delete", "libre.graph/driveItem/path/read", "libre.graph/driveItem/quota/read", "libre.graph/driveItem/content/read", "libre.graph/driveItem/upload/create", "libre.graph/driveItem/permissions/read", "libre.graph/driveItem/children/read", "libre.graph/driveItem/versions/read", "libre.graph/driveItem/deleted/read", "libre.graph/driveItem/path/update", "libre.graph/driveItem/permissions/delete", "libre.graph/driveItem/deleted/delete", "libre.graph/driveItem/versions/update", "libre.graph/driveItem/deleted/update", "libre.graph/driveItem/basic/read", "libre.graph/driveItem/permissions/update", "libre.graph/driveItem/permissions/deny" ], "@libre.graph.permissions.roles.allowedValues": [ { "@libre.graph.weight": 1, "description": "Allows upload file or folder", "displayName": "Uploader", "id": "1c996275-f1c9-4e71-abdf-a42f6495e960" }, { "@libre.graph.weight": 2, "description": "Allows reading the shared file or folder", "displayName": "Viewer", "id": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" }, { "@libre.graph.weight": 3, "description": "Allows reading and updating file", "displayName": "Editor", "id": "2d00ce52-1fc2-4dbc-8b95-a73b73395f5a" }, { "@libre.graph.weight": 4, "description": "Allows creating, reading, updating and deleting the shared file or folder", "displayName": "Editor", "id": "fb6c3e19-e378-47e5-b277-9732f9de6e21" }, { "@libre.graph.weight": 5, "description": "Grants co-owner permissions on a resource", "displayName": "Co Owner", "id": "3a4ba8e9-6a0d-4235-9140-0e7a34007abe" }, { "@libre.graph.weight": 6, "description": "Grants manager permissions on a resource. Semantically equivalent to co-owner", "displayName": "Manager", "id": "312c0871-5ef7-4b3a-85b6-0e4074c64049" } ], "value": [ { "expirationDateTime": "2055-07-15T16:00:00+02:00", "grantedToV2": { "user": { "displayName": "Marie Skłodowska Curie", "id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c" } }, "id": "3496f80c-b4c7-40cd-9ee9-f7bfb77c671c:4353a0e1-a947-4588-8be2-7730ac879eda:6be053d3-6752-4112-a71a-3002b1c0addf", "roles": [ "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" ] } ] }Response (grantee - viewer)
{ "@libre.graph.permissions.actions.allowedValues": [ "libre.graph/driveItem/permissions/create", "libre.graph/driveItem/path/read", "libre.graph/driveItem/quota/read", "libre.graph/driveItem/content/read", "libre.graph/driveItem/children/read", "libre.graph/driveItem/deleted/read", "libre.graph/driveItem/basic/read" ], "@libre.graph.permissions.roles.allowedValues": [ { "@libre.graph.weight": 1, "description": "Allows reading the shared file or folder", "displayName": "Viewer", "id": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5" } ] }Types of changes
Checklist: