You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an option in the bottom side menu: Edit space.
Only available if the user is space manager (space permission), admin or space admin (platform permissions)
Same dialog/view of creation can be displayed to edit, applying the same rules or space name:
Space name cannot be empty
Space name cannot exceed 255 characters
Space name cannot contain the following characters: / \ . : ? * " > < |'
For the quota: only are allowed to modify it the following roles: admin and space admin (platform permissions). Space manager not allowed. The permission needed: "Drives.ReadWriteProjectQuota.all"
2.- Check in graph/v1.0/me/drives the role of the user in the given space (editor , manager , viewer)
3.- Get the id of the permission (from step 1.-)
4.- Look for it in a request to graph/v1beta1/roleManagement/permissions/roleDefinitions (field id)
5.- If the match contains libre.graph/driveItem/permissions/update in the "allowedResourceActions", the edit operation is allowed. Otherwise, it is not.
Straight from permissions
Request to graph/v1beta1/drives/<drive-id>/root/permissions
That authenticated request will return the permissions of the user in the given space. In the response, the array @libre.graph.permissions.actions.allowedValues" should include "libre.graph/driveItem/permissions/update"to get the permission. There are more information in the response, but ftm, i think it's no relevant
Activity
jesmrec commentedon Sep 23, 2025
To check if a user has the permission to edit. Two ways:
Crossing requests
1.- The role ids seems to be static. They are defined here in the iOS app:
https://github.com/owncloud/ios-sdk/blob/ceda5fae8e20b2324544560dd791ea16fe94cb57/ownCloudSDK/Share/Roles/OCShareRole.m#L133
There are V1 and V2. iOS has a method that transforms V1 in V2: https://github.com/owncloud/web/blob/6983ef727ea25430d57c7625ec53f0b249132246/packages/web-client/src/graph/drives/drives.ts#L8
2.- Check in
graph/v1.0/me/drivesthe role of the user in the given space (editor,manager,viewer)3.- Get the id of the permission (from step 1.-)
4.- Look for it in a request to
graph/v1beta1/roleManagement/permissions/roleDefinitions(fieldid)5.- If the match contains
libre.graph/driveItem/permissions/updatein the "allowedResourceActions", the edit operation is allowed. Otherwise, it is not.Straight from permissions
Request to
graph/v1beta1/drives/<drive-id>/root/permissionsThat authenticated request will return the permissions of the user in the given space. In the response, the array
@libre.graph.permissions.actions.allowedValues"should include"libre.graph/driveItem/permissions/update"to get the permission. There are more information in the response, but ftm, i think it's no relevant