-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Show pending shares menu only if feature enabled #53455
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
base: master
Are you sure you want to change the base?
Show pending shares menu only if feature enabled #53455
Conversation
private function provideInitialStates(): void { | ||
$initialState = Server::get(InitialStateService::class); | ||
$config = Server::get(IConfig::class); | ||
$defaultAcceptSystemConfig = $config->getSystemValueBool('sharing.enable_share_accept'); | ||
$initialState->provideInitialState(Application::APP_ID, 'accept_default', $defaultAcceptSystemConfig); |
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.
As documented in config sample, this can be overridden by any user:
/**
* Set to true to enable that internal shares need to be accepted by the users by default.
* Users can change this for their account in their personal sharing settings
*/
'sharing.enable_share_accept' => false,
Also, users may have pending shares from before the option was set, I suppose?
I also fear that internal share are not the only kind and that users still need to accept pending federated shares even if the option is set, at least that’s how I understand the comment in config sample.
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.
Could we instead check if there are any pending shares, and hide the menu if there are none?
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
# menu is removed on ./occ config:system:set --value true --type boolean -- sharing.enable_share_accept # menu is shown on ./occ config:system:set --value false --type boolean -- sharing.enable_share_accept Signed-off-by: Misha M.-Kupriyanov <[email protected]>
b5b8444
to
a8b8100
Compare
Summary
Currently the "pending shares" is always available if feature enabled or not
Documentation: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html
Proposal
With this change the "pending shares" will be displayed only if feature is enabled.
"pending shares" menu item is shown on
./occ config:system:set --value true --type boolean -- sharing.enable_share_accept
"pending shares" menu item is removed on
./occ config:system:set --value false --type boolean -- sharing.enable_share_accept
run test via
TODO
Checklist