aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-02 09:55:32 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2024-09-03 14:57:39 +0000
commit5a30576c44220112408112210f8cb7ceba45a7d6 (patch)
tree466b730d62d56dd7cd50b3bf80b60a922eef542b /apps
parent2f285ae136a5535e84e9cb3370117408d688657a (diff)
downloadnextcloud-server-5a30576c44220112408112210f8cb7ceba45a7d6.tar.gz
nextcloud-server-5a30576c44220112408112210f8cb7ceba45a7d6.zip
fix(settings): Fix sharing exclude groups from password requirement option not working
Signed-off-by: provokateurin <kate@provokateurin.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Settings/Admin/Sharing.php4
-rw-r--r--apps/settings/src/components/AdminSettingsSharingForm.vue8
-rw-r--r--apps/settings/tests/Settings/Admin/SharingTest.php8
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index f4d3a5c107b..c7011f7eff0 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -80,8 +80,8 @@ class Sharing implements IDelegatedSettings {
'restrictUserEnumerationFullMatchEmail' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_email', true),
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'),
'enforceLinksPassword' => Util::isPublicLinkPasswordRequired(false),
- 'passwordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
- 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
+ 'enforceLinksPasswordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
'defaultExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_expire_date'),
'expireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),
diff --git a/apps/settings/src/components/AdminSettingsSharingForm.vue b/apps/settings/src/components/AdminSettingsSharingForm.vue
index 5594a1d1a7e..2ebdf8328c9 100644
--- a/apps/settings/src/components/AdminSettingsSharingForm.vue
+++ b/apps/settings/src/components/AdminSettingsSharingForm.vue
@@ -55,9 +55,9 @@
<NcCheckboxRadioSwitch :checked.sync="settings.enforceLinksPassword" :disabled="!settings.enableLinkPasswordByDefault">
{{ t('settings', 'Enforce password protection') }}
</NcCheckboxRadioSwitch>
- <label v-if="settings.passwordExcludedGroupsFeatureEnabled" class="sharing__labeled-entry sharing__input">
+ <label v-if="settings.enforceLinksPasswordExcludedGroupsEnabled" class="sharing__labeled-entry sharing__input">
<span>{{ t('settings', 'Exclude groups from password requirements') }}</span>
- <NcSettingsSelectGroup v-model="settings.passwordExcludedGroups"
+ <NcSettingsSelectGroup v-model="settings.enforceLinksPasswordExcludedGroups"
style="width: 100%"
:disabled="!settings.enforceLinksPassword || !settings.enableLinkPasswordByDefault" />
</label>
@@ -214,8 +214,8 @@ interface IShareSettings {
restrictUserEnumerationFullMatchEmail: boolean
restrictUserEnumerationFullMatchIgnoreSecondDN: boolean
enforceLinksPassword: boolean
- passwordExcludedGroups: string[]
- passwordExcludedGroupsFeatureEnabled: boolean
+ enforceLinksPasswordExcludedGroups: string[]
+ enforceLinksPasswordExcludedGroupsEnabled: boolean
onlyShareWithGroupMembers: boolean
defaultExpireDate: boolean
expireAfterNDays: string
diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php
index b34c4945774..995207c462f 100644
--- a/apps/settings/tests/Settings/Admin/SharingTest.php
+++ b/apps/settings/tests/Settings/Admin/SharingTest.php
@@ -161,8 +161,8 @@ class SharingTest extends TestCase {
'remoteExpireAfterNDays' => '7',
'enforceRemoteExpireDate' => false,
'allowLinksExcludeGroups' => [],
- 'passwordExcludedGroups' => [],
- 'passwordExcludedGroupsFeatureEnabled' => false,
+ 'enforceLinksPasswordExcludedGroups' => [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => false,
]
],
);
@@ -252,8 +252,8 @@ class SharingTest extends TestCase {
'remoteExpireAfterNDays' => '7',
'enforceRemoteExpireDate' => false,
'allowLinksExcludeGroups' => [],
- 'passwordExcludedGroups' => [],
- 'passwordExcludedGroupsFeatureEnabled' => false,
+ 'enforceLinksPasswordExcludedGroups' => [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => false,
]
],
);