From 35024beb9c6b37db260d3994c73f2f432230932b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 18 Mar 2016 16:23:33 +0100 Subject: [PATCH] Add `allow sharing with groups` checkbox to admin page --- settings/admin.php | 1 + settings/js/admin.js | 4 ++++ settings/templates/admin.php | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/settings/admin.php b/settings/admin.php index 2364fb3aae..e0d3a907f4 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -129,6 +129,7 @@ $template->assign('allowPublicMailNotification', $appConfig->getValue('core', 's $template->assign('allowMailNotification', $appConfig->getValue('core', 'shareapi_allow_mail_notification', 'no')); $template->assign('allowShareDialogUserEnumeration', $appConfig->getValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')); $template->assign('onlyShareWithGroupMembers', \OC\Share\Share::shareWithGroupMembersOnly()); +$template->assign('allowGroupSharing', $appConfig->getValue('core', 'shareapi_allow_group_sharing', 'yes')); $databaseOverload = (strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false); $template->assign('databaseOverload', $databaseOverload); $template->assign('cronErrors', $appConfig->getValue('core', 'cronErrors')); diff --git a/settings/js/admin.js b/settings/js/admin.js index 90b1de6837..1bbb20efa0 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -161,6 +161,10 @@ $(document).ready(function(){ }); }); + $('#allowGroupSharing').change(function() { + $('#allowGroupSharing').toggleClass('hidden', !this.checked); + }); + $('#shareapiExcludeGroups').change(function() { $("#selectExcludedGroups").toggleClass('hidden', !this.checked); }); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index a51b9aa16e..2f4461589d 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -239,6 +239,11 @@ if ($_['cronErrors']) { value="1" />

+

+ /> +
+

/>