Block sharing with selected groups.#49897
Conversation
|
Status: Fully functional |
d665dfd to
3824a88
Compare
|
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.) |
6f8db90 to
6d54dc3
Compare
0ac83cd to
0a2c06b
Compare
provokateurin
left a comment
There was a problem hiding this comment.
Looks mostly fine to me, but you need to make cs-fixer happy.
come-nc
left a comment
There was a problem hiding this comment.
Looks fine, did not test.
Would be better to do the check in the hideFromCollaboration method on groups, as the method is part of OCP and could be used by other apps.
Please correct me if I'm wrong but as far as I can tell the |
You can add your code (the check of the config option) inside of server/lib/private/Group/Group.php Line 378 in 4f50b5f Here you would add it like: public function hideFromCollaboration(): bool {
+ $groupsBlockList = $this->appConfig->getValueArray('core', 'shareapi_groups_block_list', []);
- return array_reduce($this->backends, function (bool $hide, GroupInterface $backend) {
+ return in_array($this->gid, $groupsBlockList)
+ || array_reduce($this->backends, function (bool $hide, GroupInterface $backend) { |
I do not know about the backends, but in this case you do not care about the backend you can implement that directly in nextcloud/server/lib/private/Group/Group.php |
0a2c06b to
26e342c
Compare
provokateurin
left a comment
There was a problem hiding this comment.
I only have a few small remarks, the approach and logic looks good to me!
Refs: nextcloud#49198 Signed-off-by: Antoon Prins <antoon.prins@surf.nl>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
33c0e4b to
b7d2961
Compare
|
Tests need to be adjusted:
|
Summary
Continuation of PR #49217
Checklist