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

[Share-ng root endpoint]Can't update expiration date for shared project drive #8905

Closed
amrita-shrestha opened this issue Apr 19, 2024 · 1 comment · Fixed by #8969
Closed
Assignees
Labels

Comments

@amrita-shrestha
Copy link
Contributor

amrita-shrestha commented Apr 19, 2024

Describe the bug

user attempted to modify the expiration date of a shared project drive but encountered a 500 status code. However, when trying to update the expiration date with a specific role, a 200 status code was returned successfully. Therefore, the issue seems to be related to changing the expiration date alone.

Steps to reproduce

  1. create project project1
  2. share project project1 using POST /drives/{driveID}/root/invite with expiration date
  3. update share permission expiration date using PATCH /drives/{driveID}/root/permissions/{permissionID}
curl --request PATCH 'https://localhost:9200/graph/v1beta1/drives/480b89c5-bc98-4278-a659-da42d2e92589$aa2c1f37-8aed-4ab5-a800-169fec41256e/root/permissions/u:4c510ada-c86b-4815-8820-42cdf82c3d51' \
--data '{
    "expirationDateTime":"2025-07-15T14:00:00Z"
}'
-------------------Response ----------------------
{
    "error": {
        "code": "generalException",
        "innererror": {
            "date": "2024-04-19T09:13:42Z",
            "request-id": "amrita-OptiPlex-3090/nysBpiUMXC-001893"
        },
        "message": "rpc error: code = Internal desc = runtime error: invalid memory address or nil pointer dereference"
    }
}

Expected behavior

expiration date should be able to be modified

Actual behavior

expiration date should changed if body contains role value only similar to body containing both role and expiration date

curl --location --request PATCH 'https://localhost:9200/graph/v1beta1/drives/480b89c5-bc98-4278-a659-da42d2e92589$aa2c1f37-8aed-4ab5-a800-169fec41256e/root/permissions/u:4c510ada-c86b-4815-8820-42cdf82c3d51' \
--data '{
    "roles":["58c63c02-1d89-4572-916a-870abc5a1b7d"],
    "expirationDateTime":"2025-07-15T14:00:00Z"
}'
--------------------Response----------------
{
    "expirationDateTime": "2025-07-15T19:45:00+05:45",
    "grantedToV2": {
        "user": {
            "displayName": "Albert Einstein",
            "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
        }
    },
    "id": "u:4c510ada-c86b-4815-8820-42cdf82c3d51",
    "roles": [
        "58c63c02-1d89-4572-916a-870abc5a1b7d"
    ]
}

Setup

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

OCIS_XXX=5.1.0-prealpha+78202793d2

Additional context

Add any other context about the problem here.

@amrita-shrestha amrita-shrestha changed the title Can't update expiration date for shared project drive [Share-ng root endpoint]Can't update expiration date for shared project drive Apr 19, 2024
@2403905 2403905 self-assigned this Apr 23, 2024
@2403905
Copy link
Contributor

2403905 commented Apr 25, 2024

Fixed by the reva PR cs3org/reva#4656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants