Skip to content

[FEATURE REQUEST] Show members of a space #4612

Closed

Description

@jesmrec

A new view to show which users are members of a space. iOS example:

Image

For the current issue, just showing the list of members

AC:

  • In the bottom sheet, new option Members . It will be visible for everyone
  • As the iOS view, in the top on the view, global info of the space (if quota is not saved yet, delayed)
  • List of members, showing the sharing role
  • If there is expiration date, we could show it as well

The operations to invite, link.. will be done in subsequent issues


I found two ways of getting the information:

  1. graph/v1.0/me/drives

(already used to get the list of spaces and so on...)

In the response, the root object contains a permission array with the list of members for the given space and its role inside the space:

{
                        "grantedToIdentities": [
                            {
                                "user": {
                                    "@libre.graph.userType": "Member",
                                    "displayName": "user3",
                                    "id": "ccd863bf-2c7c-4a93-a393-84f26f3b67a1"
                                }
                            }
                        ],
                        "grantedToV2": {
                            "user": {
                                "@libre.graph.userType": "Member",
                                "displayName": "user3",
                                "id": "ccd863bf-2c7c-4a93-a393-84f26f3b67a1"
                            }
                        },
                        "roles": [
                            "editor"
                        ]
                    },

open question: difference between grantedToIdentities and grantedToV2 . Which one should we get? they seem to contain the same info.

  1. /graph/v1beta1/drives/<drive-id>/root/permissions

it returns:

{
    "@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": "View and download.",
            "displayName": "Can view",
            "id": "a8d5fe5e-96e3-418d-825b-534dbdf22b99"
        },
        {
            "@libre.graph.weight": 2,
            "description": "View, download, upload, edit, add, delete including the history.",
            "displayName": "Can edit",
            "id": "58c63c02-1d89-4572-916a-870abc5a1b7d"
        },
        {
            "@libre.graph.weight": 3,
            "description": "View, download, upload, edit, add, delete and manage members.",
            "displayName": "Can manage",
            "id": "312c0871-5ef7-4b3a-85b6-0e4074c64049"
        }
    ],
    "value": [
        {
            "grantedToV2": {
                "user": {
                    "@libre.graph.userType": "Member",
                    "displayName": "Joeh Smith",
                    "id": "52037314-d64f-49cb-a0be-1db422d172e9"
                }
            },
            "id": "u:52037314-d64f-49cb-a0be-1db422d172e9",
            "roles": [
                "312c0871-5ef7-4b3a-85b6-0e4074c64049"
            ]
        },
        {
            "expirationDateTime": "2025-07-03T12:09:43.364Z",
            "grantedToV2": {
                "user": {
                    "@libre.graph.userType": "Member",
                    "displayName": "user3",
                    "id": "ccd863bf-2c7c-4a93-a393-84f26f3b67a1"
                }
            },
            "id": "u:ccd863bf-2c7c-4a93-a393-84f26f3b67a1",
            "roles": [
                "a8d5fe5e-96e3-418d-825b-534dbdf22b99"
            ]
        }
    ]
}

Option 1 is already handled, but option 2 seems to be easier to handle and info could be used in other places.

Is it needed to persist data??:

  • maybe, for offline scenarios.
  • better performance just showing

The way to persist:

  • reuse the current table ocshares adapting the current info to the existing one, creating any new field (now on in subsequent issues)
  • create a new table for the Sharing NG features, and let the existing one for oc10.

(open to discussion)

Refreshing the info when browsing to the space info should be enough.

NOTE: the endpoint /graph/v1beta1/roleManagement/permissions/roleDefinitions also returns a list of available permissions for every space role

TASKS

  • Research (if needed)
  • Create branch feature/show_members_of_a_space
  • Development tasks
    • Set a menu option to show members of a space
    • Create a new layout for space members
    • Implement methods to get space members info from /graph/v1beta1/drives/<drive-id>/root/permissions
    • Set space members information in thew new layout
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/show_members_of_a_space into master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions