Skip to content

Commit 5a30576

Browse files
provokateurinnextcloud-command
authored andcommitted
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>
1 parent 2f285ae commit 5a30576

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

apps/settings/lib/Settings/Admin/Sharing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public function getForm() {
8080
'restrictUserEnumerationFullMatchEmail' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_email', true),
8181
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'),
8282
'enforceLinksPassword' => Util::isPublicLinkPasswordRequired(false),
83-
'passwordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
84-
'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
83+
'enforceLinksPasswordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
84+
'enforceLinksPasswordExcludedGroupsEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
8585
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
8686
'defaultExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_expire_date'),
8787
'expireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'),

apps/settings/src/components/AdminSettingsSharingForm.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
<NcCheckboxRadioSwitch :checked.sync="settings.enforceLinksPassword" :disabled="!settings.enableLinkPasswordByDefault">
5656
{{ t('settings', 'Enforce password protection') }}
5757
</NcCheckboxRadioSwitch>
58-
<label v-if="settings.passwordExcludedGroupsFeatureEnabled" class="sharing__labeled-entry sharing__input">
58+
<label v-if="settings.enforceLinksPasswordExcludedGroupsEnabled" class="sharing__labeled-entry sharing__input">
5959
<span>{{ t('settings', 'Exclude groups from password requirements') }}</span>
60-
<NcSettingsSelectGroup v-model="settings.passwordExcludedGroups"
60+
<NcSettingsSelectGroup v-model="settings.enforceLinksPasswordExcludedGroups"
6161
style="width: 100%"
6262
:disabled="!settings.enforceLinksPassword || !settings.enableLinkPasswordByDefault" />
6363
</label>
@@ -214,8 +214,8 @@ interface IShareSettings {
214214
restrictUserEnumerationFullMatchEmail: boolean
215215
restrictUserEnumerationFullMatchIgnoreSecondDN: boolean
216216
enforceLinksPassword: boolean
217-
passwordExcludedGroups: string[]
218-
passwordExcludedGroupsFeatureEnabled: boolean
217+
enforceLinksPasswordExcludedGroups: string[]
218+
enforceLinksPasswordExcludedGroupsEnabled: boolean
219219
onlyShareWithGroupMembers: boolean
220220
defaultExpireDate: boolean
221221
expireAfterNDays: string

apps/settings/tests/Settings/Admin/SharingTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ public function testGetFormWithoutExcludedGroups(): void {
161161
'remoteExpireAfterNDays' => '7',
162162
'enforceRemoteExpireDate' => false,
163163
'allowLinksExcludeGroups' => [],
164-
'passwordExcludedGroups' => [],
165-
'passwordExcludedGroupsFeatureEnabled' => false,
164+
'enforceLinksPasswordExcludedGroups' => [],
165+
'enforceLinksPasswordExcludedGroupsEnabled' => false,
166166
]
167167
],
168168
);
@@ -252,8 +252,8 @@ public function testGetFormWithExcludedGroups(): void {
252252
'remoteExpireAfterNDays' => '7',
253253
'enforceRemoteExpireDate' => false,
254254
'allowLinksExcludeGroups' => [],
255-
'passwordExcludedGroups' => [],
256-
'passwordExcludedGroupsFeatureEnabled' => false,
255+
'enforceLinksPasswordExcludedGroups' => [],
256+
'enforceLinksPasswordExcludedGroupsEnabled' => false,
257257
]
258258
],
259259
);

dist/settings-vue-settings-admin-sharing.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-admin-sharing.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)