-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Block sharing with selected groups. #49897
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?
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
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 mostly fine to me, but you need to make cs-fixer happy.
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 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
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 only have a few small remarks, the approach and logic looks good to me!
c42ff59
to
1cb5453
Compare
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.
Thanks a lot, this looks really nice now!
d0c793c
to
3b03177
Compare
Right I see, that's coming from the cs-fix. But I reverted it. |
Can you squash the commits? Your commit message will also have to follow https://www.conventionalcommits.org/en/v1.0.0/ to pass CI. |
3b03177
to
90fc3bd
Compare
e848cb9
to
4c1afe0
Compare
Refs: nextcloud#49198 Signed-off-by: Antoon Prins <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
33c0e4b
to
b7d2961
Compare
Tests need to be adjusted:
|
Summary
Continuation of PR #49217
Checklist