diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2021-06-01 12:07:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 12:07:29 +0200 |
commit | b29c3aa03f1f5b95b12b51e4f95148f2f01b59d3 (patch) | |
tree | 29ab71a2c5a7723fddd34ee2e6ec17f7245e11d9 /lib | |
parent | 68a02bbef8dfe47dd4c54023f02fde4e91e212d9 (diff) | |
parent | 1c0d975654f71a1ac6a3d30ece915fa6e55397da (diff) | |
download | nextcloud-server-b29c3aa03f1f5b95b12b51e4f95148f2f01b59d3.tar.gz nextcloud-server-b29c3aa03f1f5b95b12b51e4f95148f2f01b59d3.zip |
Merge pull request #25658 from nextcloud/dav-respect-disallow-sharing-with-groups
Dav respect disallow sharing with groups
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Collaboration/Collaborators/GroupPlugin.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Collaborators/GroupPlugin.php b/lib/private/Collaboration/Collaborators/GroupPlugin.php index 18a6631ed80..5161f67beb9 100644 --- a/lib/private/Collaboration/Collaborators/GroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/GroupPlugin.php @@ -38,8 +38,14 @@ use OCP\IUserSession; use OCP\Share\IShare; class GroupPlugin implements ISearchPlugin { + /** @var bool */ protected $shareeEnumeration; + /** @var bool */ protected $shareWithGroupOnly; + /** @var bool */ + protected $shareeEnumerationInGroupOnly; + /** @var bool */ + protected $groupSharingDisabled; /** @var IGroupManager */ private $groupManager; @@ -56,9 +62,14 @@ class GroupPlugin implements ISearchPlugin { $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; $this->shareWithGroupOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes'; $this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; + $this->groupSharingDisabled = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'no'; } public function search($search, $limit, $offset, ISearchResult $searchResult) { + if ($this->groupSharingDisabled) { + return false; + } + $hasMoreResults = false; $result = ['wide' => [], 'exact' => []]; |