Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

Handle the remove/update share permissions response. #10507

Closed

Description

@2403905

Describe the bug

Regarding the backend changes https://github.com/owncloud/ocis/issues/8273 we should handle the remove/update share permissions response 423 when the file is locked.

Steps to reproduce

  1. admin created the file.txt and shared to einstein with the editor permissions.
  2. einstein locked the file
curl -XLOCK 'https://localhost:9200/remote.php/dav/spaces/storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000/file.txt' -ueinstein:relativity \
-H "Content-Type: application/xml" -H "timeout: Second-300" -d "<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'><d:lockscope><d:shared/></d:lockscope></d:lockinfo>" -vk
  1. admin tries to remove/update share permissions.

Expected behavior

admin get the message that the file is locked.

Actual behavior

On the delete share action user recursively gets the removing dialog window

Setup

local

Details

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

Activity

  1. added
    Type:Bug
    Priority:p2-high
    on Feb 22, 2024
  2. moved this from Qualification to Prio 2 in Infinite Scale Team Boardon Feb 23, 2024
  3. moved this from Prio 2 to Backlog in Infinite Scale Team Boardon Feb 23, 2024
  4. v-scharf commented on Feb 23, 2024

    @v-scharf
    Contributor

    we disable on web delete rename or move action if file is locked
    Screenshot 2024-02-23 at 09 47 17

    If possible, I would prefer that the user not have the ability to change or delete the resource share.

    my expected behavior:
    Screenshot 2024-02-23 at 09 48 54

  5. self-assigned this
    on Feb 23, 2024
  6. AlexAndBear commented on Feb 24, 2024

    @AlexAndBear
    Contributor

    @kulmann do you agree with this behavior ? Or should we make it more clear to the user ?

  7. kulmann commented on Feb 26, 2024

    @kulmann
    Contributor

    @AlexAndBear yes, that would be fine. The file name should have the lock information, both in the file list and in the right sidebar header section. As long as that shows the lock information (i.e. small icon with a lock) I wouldn't clutter the UI with even more lock information. Disabling write actions is sufficient then. 👍

  8. moved this from Backlog to In progress in Infinite Scale Team Boardon Mar 4, 2024
  9. v-scharf commented on Mar 6, 2024

    @v-scharf
    Contributor

    re-tested. can confirm that case with file is fixed
    image

    @kulmann @micbar I'm sorry to say, but we didn't have all the cases covered.
    owncloud/ocis#8273 (comment) this workaround fixes only issue with file
    IMHO we cannot disable change member role or change share role of folder if one file in the space or folder is locked

    case 1 (project space)
    steps:

    • admin created the file.txt and shared to einstein with the editor permissions.
    • einstein locked the file
    curl -XLOCK 'https://localhost:9200/remote.php/dav/spaces/projectSpaceUUID/file.txt' -ueinstein:relativity \
    -H "Content-Type: application/xml" -H "timeout: Second-300" -d "<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'><d:lockscope><d:shared/></d:lockscope></d:lockinfo>" -vk
    
    • admin removes/updates einstein space role.

    case 2 (folder with files)

    • admin created the f1/file.txt and shared folderf1 to einstein with the editor permissions.
    • einstein locked the file
    curl -XLOCK 'https://localhost:9200/remote.php/dav/spaces/projectSpaceUUID/file.txt' -ueinstein:relativity \
    -H "Content-Type: application/xml" -H "timeout: Second-300" -d "<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'><d:lockscope><d:shared/></d:lockscope></d:lockinfo>" -vk
    
    • admin remove/update share permissions of folder f1

    Actual: file is locked. Admin and another users cannot open this file:
    image

  10. removed their assignment
    on Mar 14, 2024
  11. v-scharf commented on Mar 18, 2024

    @v-scharf
    Contributor

    close in favor owncloud/ocis#8678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:p2-highType:Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions