|
|
|
@ -21,6 +21,7 @@ use OCP\Files\Mount\IShareOwnerlessMount; |
|
|
|
|
use OCP\Files\Node; |
|
|
|
|
use OCP\Files\NotFoundException; |
|
|
|
|
use OCP\HintException; |
|
|
|
|
use OCP\IAppConfig; |
|
|
|
|
use OCP\IConfig; |
|
|
|
|
use OCP\IDateTimeZone; |
|
|
|
|
use OCP\IGroupManager; |
|
|
|
@ -79,6 +80,7 @@ class Manager implements IManager { |
|
|
|
|
private KnownUserService $knownUserService, |
|
|
|
|
private ShareDisableChecker $shareDisableChecker, |
|
|
|
|
private IDateTimeZone $dateTimeZone, |
|
|
|
|
private IAppConfig $appConfig, |
|
|
|
|
) { |
|
|
|
|
$this->l = $this->l10nFactory->get('lib'); |
|
|
|
|
// The constructor of LegacyHooks registers the listeners of share events |
|
|
|
@ -1906,6 +1908,10 @@ class Manager implements IManager { |
|
|
|
|
return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function allowCustomTokens(): bool { |
|
|
|
|
return $this->appConfig->getValueBool('core', 'shareapi_allow_custom_tokens', false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function currentUserCanEnumerateTargetUser(?IUser $currentUser, IUser $targetUser): bool { |
|
|
|
|
if ($this->allowEnumerationFullMatch()) { |
|
|
|
|
return true; |
|
|
|
|