Skip to content

Cannot update public link role when password is required for writable shares #2048

@ScharfViktor

Description

@ScharfViktor

Describe the bug

opencloud version 4.1.0
run opencloud with:

  • OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=false
  • OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=true

Steps to reproduce

  1. create file or space
  2. create public link with view role (no password required)
  3. try to change role

Expected behavior

A password dialog should appear prompting the user to set a password

Actual behavior

web issue:

  • no password dialog so you send Patch request without password and get 400 message: "password protection is enforced"
Screen.Recording.2025-12-17.at.11.33.02.mov

backend issue:
when I send request curl --location --request PATCH 'https://opencloud-server:9200/graph/v1beta1/drives/driveId/items/itemId/permissions/qVomPXGDjTzOHZP' --data '{"link":{"type": "edit"}, "password":"8Ogw=\"sYL-09"} I get 400

Image

but docs says I can update password in the patch request
https://docs.opencloud.eu/swagger/libre-graph-api/#/drives.permissions/UpdatePermission

here is workaround:

  1. set password using https://docs.opencloud.eu/swagger/libre-graph-api/#/drives.permissions/SetPermissionPassword
  2. update role https://docs.opencloud.eu/swagger/libre-graph-api/#/drives.permissions/UpdatePermission

Setup

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

Details

OC_XXX=somevalue
OC_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions