From 8edc824526570fcfbd0b5f48606015ba0ae2b81b Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 20 Feb 2020 18:51:35 +0100 Subject: Expose enumeration config though share manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Share20/Manager.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/private') diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 82e948344c1..9023e14fd2c 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1764,6 +1764,15 @@ class Manager implements IManager { return $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; } + public function allowEnumeration(): bool { + return $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; + } + + public function limitEnumerationToGroups(): bool { + return $this->allowEnumeration() && + $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; + } + /** * Copied from \OC_Util::isSharingDisabledForUser * -- cgit v1.2.3