-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix resharing of federated shares that were created out of links #19793
Conversation
$share->setPermissions(Constants::PERMISSION_READ); | ||
$permissions = Constants::PERMISSION_READ; | ||
} | ||
// TODO: It might make sense to have a dedicated setting to allow/deny converting link shares into federated ones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the reason is, that you can still mount the dav endpoint as external storage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so in that case turning of share permissions on a link would be kind of hiding it only anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense, though I'm not a sharing expert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
But ci says no |
ea47311
to
2ac680c
Compare
CI still says no
|
Signed-off-by: Julius Härtl <[email protected]>
…enabled Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
2ac680c
to
397ab1c
Compare
Ok, some sharing integration tests also need fixes here, I'll have another look. |
Signed-off-by: Julius Härtl <[email protected]>
Fine now. The integration-sharees-* ones are different issues failing on master as well. |
} | ||
// TODO: It might make sense to have a dedicated setting to allow/deny converting link shares into federated ones | ||
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) { | ||
$permissions |= Constants::PERMISSION_SHARE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this actually breaks the UI.
Because suddenly we have SHARE+READ (17) instead of just READ (1).
The front doesn't understand it as it's not part of the available options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/apps/files_sharing/src/components/SharingEntryLink.vue
Lines 352 to 355 in 699cbeb
publicUploadRWValue: OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE, | |
publicUploadRValue: OC.PERMISSION_READ, | |
publicUploadWValue: OC.PERMISSION_CREATE, | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it's even worse, we add the Share permission on create
But we always remove it on update. 🤔
server/apps/files_sharing/lib/Controller/ShareAPIController.php
Lines 992 to 993 in cb05782
$newPermissions = (int) $permissions; | |
$newPermissions = $newPermissions & ~Constants::PERMISSION_SHARE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix in progress in #20726
Also, needs backport, no ? |
/backport to stable18 |
The backport to stable18 failed. Please do this backport manually. |
|
This basically fixes two seaparte issues that caused the issue description from below:
Steps to reproduce
Caveat
One unfixed part remains. Since before this patch accessing the reshare was possible for the first time and only failed on continuous requests. This is mainly caused by the super share being initialized first
server/apps/files_sharing/lib/SharedStorage.php
Line 90 in 5bf3d1b
server/lib/private/Files/Cache/Watcher.php
Line 103 in 5bf3d1b