-
-
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
Changes from all commits
45c3ee7
5646f7c
397ab1c
7a9469f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -492,15 +492,18 @@ public function createShare( | |||||||||||||
throw new OCSNotFoundException($this->l->t('Public upload is only possible for publicly shared folders')); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
$share->setPermissions( | ||||||||||||||
Constants::PERMISSION_READ | | ||||||||||||||
$permissions = Constants::PERMISSION_READ | | ||||||||||||||
Constants::PERMISSION_CREATE | | ||||||||||||||
Constants::PERMISSION_UPDATE | | ||||||||||||||
Constants::PERMISSION_DELETE | ||||||||||||||
); | ||||||||||||||
Constants::PERMISSION_DELETE; | ||||||||||||||
} else { | ||||||||||||||
$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 | ||||||||||||||
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) { | ||||||||||||||
$permissions |= Constants::PERMISSION_SHARE; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this actually breaks the UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it's even worse, we add the Share permission on create server/apps/files_sharing/lib/Controller/ShareAPIController.php Lines 992 to 993 in cb05782
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix in progress in #20726 |
||||||||||||||
} | ||||||||||||||
$share->setPermissions($permissions); | ||||||||||||||
|
||||||||||||||
// Set password | ||||||||||||||
if ($password !== '') { | ||||||||||||||
|
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.