From 9af96d9f9ac512d8082cd20303068f06646b4a93 Mon Sep 17 00:00:00 2001 From: Baptiste Fotia Date: Wed, 27 Dec 2023 12:56:23 +0100 Subject: [PATCH 1/4] feat(php,vue): Create a new parameter Signed-off-by: Baptiste Fotia --- apps/settings/lib/Settings/Admin/Sharing.php | 2 ++ .../components/AdminSettingsSharingForm.vue | 8 ++++++ .../tests/Settings/Admin/SharingTest.php | 2 ++ .../Collaborators/GroupPlugin.php | 8 ++++++ .../Collaborators/MailPlugin.php | 9 +++++++ .../Collaborators/UserPlugin.php | 9 +++++++ .../Contacts/ContactsMenu/ContactsStore.php | 10 ++++++++ lib/private/Share20/Manager.php | 25 ++++++++++++++++++- lib/public/Share/IManager.php | 9 +++++++ tests/lib/Share20/ManagerTest.php | 5 ++++ 10 files changed, 86 insertions(+), 1 deletion(-) diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index f4d3a5c107b93..fc8b811eccdfa 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -63,6 +63,7 @@ public function getForm() { $excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', ''); $linksExcludedGroups = $this->config->getAppValue('core', 'shareapi_allow_links_exclude_groups', ''); $excludedPasswordGroups = $this->config->getAppValue('core', 'shareapi_enforce_links_password_excluded_groups', ''); + $onlyShareWithGroupMembersExcludeGroupList = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members_exclude_group_list', ''); $parameters = [ // Built-In Sharing @@ -83,6 +84,7 @@ public function getForm() { 'passwordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [], 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false), 'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(), + 'onlyShareWithGroupMembersExcludeGroupList' => json_decode($onlyShareWithGroupMembersExcludeGroupList) ?? [], 'defaultExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_expire_date'), 'expireAfterNDays' => $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'), 'enforceExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_enforce_expire_date'), diff --git a/apps/settings/src/components/AdminSettingsSharingForm.vue b/apps/settings/src/components/AdminSettingsSharingForm.vue index 2165303349f84..6850ab7424342 100644 --- a/apps/settings/src/components/AdminSettingsSharingForm.vue +++ b/apps/settings/src/components/AdminSettingsSharingForm.vue @@ -37,6 +37,13 @@ {{ t('settings', 'Restrict users to only share with users in their groups') }} +