Commit Graph
8 Commits
Author SHA1 Message Date
Florian SchadeandGitHub ad06a192d8 enhancement: add graph beta listPermissions endpoint (#7753)
* 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
2023-11-28 17:06:04 +01:00
Michael BarzandFlorian Schade c035fc80a9 feat(api): add new sharing NG create link feature 2023-11-28 14:56:12 +01:00
Ralf HaferkampandGitHub 9303cdece7 graph: Set roles/actions in sharedByMe response (#7703)
* unifiedrole: Add CS3ResourcePermissionsToLibregraphActions

Add function to convert CS3ResourcePermsissions to libregraph actions

* unifiedrole: Fix strings for the UnifiedRoleConditionSelf

The "Self/Owner/Grantee" string are not part the the constraint value

* graph: Move getRoleDefinitionList to unifiedrole module

rename it to GetBuiltinRoleDefinitionList and make it public

* graph: turn libregraph resource actions into string constants

* graph/sharedbyme: Set the correct roles (or actions) on permissions

Try to map CS3 resource permissions on a share to one of the default libregraph
UnifiedRoleDefinitions. If a match if found return the roleid in 'permissions.roles'
attribute of the response. If no match if found convert the
ResourcePermissions in to `libre.graph.permissions.actions` and return
those in the response.
2023-11-17 15:41:24 +01:00
Ralf HaferkampandRalf Haferkamp e084e5a722 graph/sharebyme: Use cache for user and group lookups 2023-11-08 14:45:44 +01:00
Ralf HaferkampandRalf Haferkamp d2cff38ab4 graph/sharedbyme: Add user and group names to permissions 2023-11-06 09:35:27 +01:00
Ralf HaferkampandRalf Haferkamp 580a4e0d92 graph/sharedbyme: populate the permissions property
Set the exipration date, grantedToV2 and link attributes on the
permissions.

The displayName for users and groups isn't expanded yet (only the "id" is set)
Also, the "roles" attribute cannot be populated yet.
2023-11-06 09:35:27 +01:00
Ralf HaferkampandRalf Haferkamp 454ec52955 graph/sharedbyme: Use existing method to initialize driveitem properties
getDriveItem does a Stat() call on the resource and sets the
corresponding DriveItem properties.
2023-11-06 09:35:27 +01:00
Ralf HaferkampandRalf Haferkamp f18775b1cb graph: Initial implementation of /me/drives/sharedByMe endpoint
This adds a still incomplete implementation of the new /me/drives/sharedByMe
endpoint. For now it only sets the driveItem Id property. The 'permissions' relation
is not supported yet.

This endpoint is added to the /v1beta1 route, to indicate that it is
still imcomplete and might require changes.
2023-11-06 09:35:27 +01:00