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

Handle the remove/update share permissions response. #10507

Closed
2403905 opened this issue Feb 22, 2024 · 5 comments
Closed

Handle the remove/update share permissions response. #10507

2403905 opened this issue Feb 22, 2024 · 5 comments
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@2403905
Copy link
Contributor

2403905 commented Feb 22, 2024

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

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

@2403905 2403905 added Type:Bug Something isn't working Priority:p2-high Escalation, on top of current planning, release blocker labels Feb 22, 2024
@2403905 2403905 moved this from Qualification to Prio 2 in Infinite Scale Team Board Feb 23, 2024
@2403905 2403905 moved this from Prio 2 to Backlog in Infinite Scale Team Board Feb 23, 2024
@ScharfViktor
Copy link
Contributor

ScharfViktor commented Feb 23, 2024

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

@AlexAndBear AlexAndBear self-assigned this Feb 23, 2024
@AlexAndBear
Copy link
Contributor

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

@kulmann
Copy link
Contributor

kulmann commented Feb 26, 2024

@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. 👍

@ScharfViktor
Copy link
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

@AlexAndBear AlexAndBear removed their assignment Mar 14, 2024
@ScharfViktor
Copy link
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
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants