Skip to content

[FEATURE REQUEST] Edit space #4607

Closed

Description

@jesmrec

AC:

  • 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"

Base request:

PATCH https://<server>/graph/v1.0/drives/<drive-id>

following the same lines as the creation

There is no information about error handling, so if any error would happen, it'd be enough showing a generic error message.

TASKS

  • Research (if needed)
  • Create branch feature/edit_space
  • Development tasks
    • Add a new option (Edit space) in the bottom side menu for users with right permissions
    • Display a dialog to update the space
    • Update the space with new values and refresh the spaces list
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/edit_space into master

Activity

  1. added this to the 4.7 - Next milestone on Jun 18, 2025
  2. jesmrec commented on Sep 23, 2025

    @jesmrec
    MemberAuthor

    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/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

  3. self-assigned this
    on Sep 24, 2025
  4. linked a pull request that will close this issue[FEATURE REQUEST] Edit space #4687on Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions