diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2022-05-04 13:38:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 13:38:03 +0200 |
commit | 7ccfddbe6462840bfabed1f64e04385ed34f66fc (patch) | |
tree | a798c3601d984744864cb1bb73d1336b5d66524f /lib | |
parent | 8fecf3467f778ff9e7a6ad6ab591a32e005c9546 (diff) | |
parent | e8ab298d2c718c0b6e671c127ffa51d840654cda (diff) | |
download | nextcloud-server-7ccfddbe6462840bfabed1f64e04385ed34f66fc.tar.gz nextcloud-server-7ccfddbe6462840bfabed1f64e04385ed34f66fc.zip |
Merge pull request #31963 from nextcloud/feat/use_setting_in_dav_search
Use share setting in DAV search
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/Manager.php | 8 | ||||
-rw-r--r-- | lib/public/Share/IManager.php | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index aab69eae597..eed86bb41c3 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1963,6 +1963,14 @@ class Manager implements IManager { return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes'; } + public function matchEmail(): bool { + return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes'; + } + + public function ignoreSecondDisplayName(): bool { + return $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_display_name', 'no') === 'yes'; + } + public function currentUserCanEnumerateTargetUser(?IUser $currentUser, IUser $targetUser): bool { if ($this->allowEnumerationFullMatch()) { return true; diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index f6b74c4de4a..f207ca87a2c 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -455,6 +455,22 @@ interface IManager { public function allowEnumerationFullMatch(): bool; /** + * Check if the search should match the email + * + * @return bool + * @since 25.0.0 + */ + public function matchEmail(): bool; + + /** + * Check if the search should ignore the second in parentheses display name if there is any + * + * @return bool + * @since 25.0.0 + */ + public function ignoreSecondDisplayName(): bool; + + /** * Check if the current user can enumerate the target user * * @param IUser|null $currentUser |