From 0e06ee68c0af2a953a5b32865c48a8bdfa6396b3 Mon Sep 17 00:00:00 2001
From: Louis Chemineau
Date: Wed, 6 Apr 2022 12:55:29 +0200
Subject: Add settings to not match userID during full match
Signed-off-by: Louis Chemineau
---
apps/settings/lib/Settings/Admin/Sharing.php | 1 +
apps/settings/src/admin.js | 4 ++++
apps/settings/templates/settings/admin/sharing.php | 11 ++++++++++-
3 files changed, 15 insertions(+), 1 deletion(-)
(limited to 'apps')
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index a5f85003fa4..d2c3e907b3e 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -89,6 +89,7 @@ class Sharing implements IDelegatedSettings {
'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'),
'restrictUserEnumerationToPhone' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no'),
'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'),
+ 'restrictUserEnumerationFullMatchUserId' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'),
'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false),
'passwordExcludedGroups' => $excludedPasswordGroupsList,
'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js
index c3704eed42c..ee7b4b6b202 100644
--- a/apps/settings/src/admin.js
+++ b/apps/settings/src/admin.js
@@ -155,6 +155,10 @@ window.addEventListener('DOMContentLoaded', () => {
$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)
})
+ $('#shareapi_restrict_user_enumeration_full_match').on('change', function() {
+ $('#shareapi_restrict_user_enumeration_full_match_userid_setting').toggleClass('hidden', !this.checked)
+ })
+
$('#allowLinks').change(function() {
$('#publicLinkSettings').toggleClass('hidden', !this.checked)
$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))
diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php
index b51f9339166..09918d4bc64 100644
--- a/apps/settings/templates/settings/admin/sharing.php
+++ b/apps/settings/templates/settings/admin/sharing.php
@@ -245,7 +245,16 @@
/>
-
+
+
+
+ />
+
--
cgit v1.2.3