Skip to content

[FEATURE REQUEST] Create a new space #4606

Closed

Description

@jesmrec

ACs:

  • FAB in Spaces view
  • Dialog or view to create it, with the following inputs :
    - Name (required)
    - Subtitle
    - Quota -> the easiest way. No limit is also a value (check server)
  • Restrictions for space name (don't apply to subtitle):
    - Space name cannot be empty
    - Space name cannot exceed 255 characters
    - Space name cannot contain the following characters: / \ . : ? * " > < |'
  • Only for users with space admin or admin roles ("Drives.Create.all")

Base request:

POST https://<server>/graph/v1.0/drives

(https://owncloud.dev/libre-graph-api/#/drives/CreateDrive)

(iOS team uses POST https://<server>/graph/v1.0/drives?template=default, any difference?)

with body:

{
            "description": "my space",
            "name": "Space request",
             "quota": {
                   "total": 1000000000
               }
}

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/create_new_space
  • Development tasks
    • Get user permissions with /api/v0/settings/permissions-list request
    • Check if the response contains Drives.Create.all permission and show FAB
    • Show dialog for creating space
    • Set restrictions for space name
    • Create the space with /graph/v1.0/drives post request
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/create_new_space into master

Activity

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

    @jesmrec
    MemberAuthor

    the iOS app determines that by sending a POST request to /api/v0/settings/permissions-list with a JSON body containing the account_uuid: "{ "account_uuid": "..." }"

    If the returned JSON contains the permission "Drives.Create.all", the user can create spaces.

    This approach seems to be more dynamic as checking the role. That endpoint could help to know other permissions and that leads not to implement #4605. To discuss.

  3. self-assigned this
    on Sep 9, 2025
  4. linked a pull request that will close this issue[FEATURE REQUEST] Create a new space #4683on Sep 10, 2025
  5. joragua commented on Sep 19, 2025

    @joragua
    Member

    Summary

    1. All user permissions are fetched from the server using the account id stored in the Account Manager
    2. If the user has Drives.Create.All permission, a floating action button (FAB) is shown in the spaces list.
    3. Tapping the FAB opens the space creation dialog.
    4. The space name is validated with all restrictions (see issue description)
    5. Once the Create button is tapped with valid values, the space is created on the server and the spaces list is refreshed.
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