-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add option to exclude groups from creating link shares #26727
Conversation
How is this then shown to clients? |
Clients should see the same from the capabilities response as if link shares were completely disabled |
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.
Does the trick for me!
However, linting, psalm and phpunit are not happy |
253f504
to
9afb874
Compare
apps/files/list.php
Outdated
$publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'); | ||
/** @var IManager $shareManager */ | ||
$shareManager = \OC::$server->get(IManager::class); | ||
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload(); |
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 couldn't find any usage of the data attribute where this value is assigned to but from a compatibility perspective we should probably preserve the yes/no values here:
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload(); | |
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no'; |
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.
Small comment, otherwise code looks good and works as expected 👍
1e333bc
to
094c4d5
Compare
Now just the CapabilitiesTest still needs adjustments 😉 |
094c4d5
to
83ce240
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
83ce240
to
8d7fae8
Compare
CI is happy :) |
I would have hoped to solve this in a more generic "per group share settings" way but the way the code base interacts with the share settings is to messy to do that without a lot of rework (this PR includes some improvement in this area).