Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sharing-NG] Different response while requesting Pesronal/Shares drive permissions using root and permissions endpoints #8922

Open
nirajacharya2 opened this issue Apr 23, 2024 · 1 comment
Labels

Comments

@nirajacharya2
Copy link
Contributor

nirajacharya2 commented Apr 23, 2024

Describe the bug

we have two APIs for listing permission for drives i.e.:

  1. https://owncloud.dev/libre-graph-api/#/drives.root/ListPermissionsSpaceRoot
  2. https://owncloud.dev/libre-graph-api/#/drives.permissions/ListPermissions

Those API should should give same output but. when listing permission of shares space
we get different response

  • (Personal/Shares) using /drives/{driveId}root/permissions: 400

    When user "Alice" tries to list the permissions of space "<drive>" using root endpoint of the Graph API
    Then the HTTP status code should be "400"

  • (Personal) using /drives/{Personal-driveId}/items/{drive-root-itemid} : 200

{
  {
  "@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 and delete.",
      "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"
    }
  ]
}
  • (Shares) using /drives/{Shares-driveId}/items/{drive-root-itemid} : 200
{
  "@libre.graph.permissions.roles.allowedValues": []
}

Expected behavior

both responses should be same.

Actual behavior

different endpoints give different response for same data

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

ownCloud Web UI 9.0.0-alpha.5 index.html-CrS3YD27.mjs:1:414288
 Infinite Scale 5.1.0-prealpha+0960d7f136 Community

Additional context

Add any other context about the problem here.

@saw-jan
Copy link
Member

saw-jan commented Apr 23, 2024

CC @ScharfViktor @rhafer

@saw-jan saw-jan changed the title [Share-Ng] requesting same data gives diffrent response for permissions [SharingNg] Different response while requesting Pesronal/Shares drive permissions using root and permissions endpoints Apr 23, 2024
@rhafer rhafer changed the title [SharingNg] Different response while requesting Pesronal/Shares drive permissions using root and permissions endpoints [Sharing-NG] Different response while requesting Pesronal/Shares drive permissions using root and permissions endpoints Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Qualification
Development

No branches or pull requests

2 participants