Skip to content

[OCM] roles id not available on sharedWithMe response when listing shares shared with editor role #11054

@PrajwolAmatya

Description

@PrajwolAmatya

Describe the bug

When a resource is shared with editor role and sharee (federated user) lists the shares with sharedWithMe endpoint, then the roles id is not available in the response. The roles id is only availble for viewer role.

Steps to reproduce

  1. Create two ocis instance
  2. On first instance as user Alice create two folders folder1 and folder2
  3. Share folder1 with Viewer role and folder2 with Editor role to federated user Brian
  4. Brian lists the shares
curl -kv -XGET "https://localhost:10200/graph/v1beta1/me/drive/sharedWithMe" -ubrian:1234 | jq

Response

{
  "value": [
    {
      "@UI.Hidden": false,
      "@client.synchronize": false,
      "createdBy": {
        "user": {
          "@libre.graph.userType": "Federated",
          "displayName": "Alice Hansen",
          "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
        }
      },
      "eTag": "\"76612f8dba841556b79b6bbdb35b61c8\"",
      "folder": {},
      "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$89f37a33-858b-45fa-8890-a1f2b27d90e1!1970e4d0-1e09-4771-abbb-46d37d80e3e8",
      "lastModifiedDateTime": "2025-02-25T09:37:32+05:45",
      "name": "folder2",
      "parentReference": {
        "driveId": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668",
        "driveType": "virtual",
        "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668"
      },
      "remoteItem": {
        "createdBy": {
          "user": {
            "@libre.graph.userType": "Federated",
            "displayName": "Alice Hansen",
            "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
          }
        },
        "eTag": "\"76612f8dba841556b79b6bbdb35b61c8\"",
        "folder": {},
        "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$dd9e1af6-ed6f-4bf2-afc9-defb22ca805e!Lw==",
        "lastModifiedDateTime": "2025-02-25T09:37:32+05:45",
        "name": "folder2",
        "permissions": [
          {
            "@libre.graph.permissions.actions": [
              "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/deleted/read",
              "libre.graph/driveItem/path/update",
              "libre.graph/driveItem/deleted/update",
              "libre.graph/driveItem/basic/read"
            ],
            "createdDateTime": "2025-02-25T09:37:57.34485494+05:45",
            "grantedToV2": {
              "user": {
                "@libre.graph.userType": "Member",
                "displayName": "Brian Murphy",
                "id": "de38f0cf-5539-4796-bb06-ccd2c1129b75"
              }
            },
            "id": "dd9e1af6-ed6f-4bf2-afc9-defb22ca805e",
            "invitation": {
              "invitedBy": {
                "user": {
                  "@libre.graph.userType": "Federated",
                  "displayName": "Alice Hansen",
                  "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
                }
              }
            }
          }
        ]
      }
    },
    {
      "@UI.Hidden": false,
      "@client.synchronize": false,
      "createdBy": {
        "user": {
          "@libre.graph.userType": "Federated",
          "displayName": "Alice Hansen",
          "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
        }
      },
      "eTag": "\"82790e0254a458e18a3820ca4b19b049\"",
      "folder": {},
      "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$89f37a33-858b-45fa-8890-a1f2b27d90e1!4256b695-044e-4d24-93de-b29d9d47f26e",
      "lastModifiedDateTime": "2025-02-25T09:37:26+05:45",
      "name": "folder1",
      "parentReference": {
        "driveId": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668",
        "driveType": "virtual",
        "id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668"
      },
      "remoteItem": {
        "createdBy": {
          "user": {
            "@libre.graph.userType": "Federated",
            "displayName": "Alice Hansen",
            "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
          }
        },
        "eTag": "\"82790e0254a458e18a3820ca4b19b049\"",
        "folder": {},
        "id": "89f37a33-858b-45fa-8890-a1f2b27d90e1$e38b5840-5875-4b68-972e-1ee9c01780d7!Lw==",
        "lastModifiedDateTime": "2025-02-25T09:37:26+05:45",
        "name": "folder1",
        "permissions": [
          {
            "createdDateTime": "2025-02-25T09:37:48.376173839+05:45",
            "grantedToV2": {
              "user": {
                "@libre.graph.userType": "Member",
                "displayName": "Brian Murphy",
                "id": "de38f0cf-5539-4796-bb06-ccd2c1129b75"
              }
            },
            "id": "e38b5840-5875-4b68-972e-1ee9c01780d7",
            "invitation": {
              "invitedBy": {
                "user": {
                  "@libre.graph.userType": "Federated",
                  "displayName": "Alice Hansen",
                  "id": "Njk4MzRhYjctY2U5MC00NGZhLWE4ZjEtNzgxNjY3YWIzYjk2QGh0dHBzOi8vbG9jYWxob3N0OjkyMDA="
                }
              }
            },
            "roles": [
              "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
            ]
          }
        ]
      }
    }
  ]
}

Here, it can be seen that while listing share, roles property is not available for folder2 which was shared with Editor role.
This same behavior exists for file sharing.

Expected behavior

The roles property should be available in the sharedWithMe response for resources shared with all permissions role.

Actual behavior

The roles property is not available for resources shared with Editor role.

Setup

  • Infinite Scale 7.1.0-rc.4+4a2f10519b Community
  • ownCloud Web UI 11.1.3

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions