diff options
author | Joas Schilling <coding@schilljs.com> | 2021-01-29 15:59:41 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2021-05-26 11:19:58 +0200 |
commit | e4b5645883d89ee3aca4105c1bde6ae4939f927c (patch) | |
tree | 45350e3f1e13260053240037cdf2a43ff11aa236 /lib/private/Collaboration | |
parent | 903b99bd9310c7255d4ea339c79a52a779f1a7cc (diff) | |
download | nextcloud-server-e4b5645883d89ee3aca4105c1bde6ae4939f927c.tar.gz nextcloud-server-e4b5645883d89ee3aca4105c1bde6ae4939f927c.zip |
Also make other shares listen to the "Allow sharing with groups"
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Collaboration')
-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' => []]; |