Skip to content

usershareprovider: Prevent setting container specific permissions on files - #4462

Merged
rhafer merged 1 commit into
cs3org:edgefrom
rhafer:ocisissue/8131
Jan 19, 2024
Merged

rhafer merged 1 commit into
cs3org:edgefrom
rhafer:ocisissue/8131

Conversation

@rhafer

@rhafer rhafer commented Jan 18, 2024

Copy link
Copy Markdown
Contributor

It was possible to set the 'CreateContainer', 'Move' or 'Delete' permissions on file resources with a CreateShare request. These permissions are meant to be only set on container resources. The UpdateShare request already has a similar check.

Parial Fix: owncloud/ocis#8131

@rhafer
rhafer marked this pull request as ready for review January 18, 2024 11:14
@rhafer
rhafer requested review from a team, glpatcern and labkode as code owners January 18, 2024 11:14
…files

It was possible to set the 'CreateContainer', 'Move' or 'Delete' permissions on
file resources with a CreateShare request. These permissions are meant to be only
set on container resources. The UpdateShare request already has a similar check.

Partial Fix: owncloud/ocis#8131

@kobergj kobergj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that CreateContainer and Move make no sense on a share. But why are we blocking Delete?

Just out of curiosity. Code looks good 👍

@rhafer

rhafer commented Jan 19, 2024

Copy link
Copy Markdown
Contributor Author

But why are we blocking Delete? Just out of curiosity. Code looks good 👍

AFAIU the Delete permission is intended for Folder/Containers to indicate that you are allowed to delete content in them. (Similar to how on a posix file system to need wx permission on the folder to be able to delete files in there. But you don't need write permission on the file itself)

@rhafer
rhafer merged commit 537c934 into cs3org:edge Jan 19, 2024
@micbar micbar mentioned this pull request Jan 26, 2024
67 of 71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants