diff --git a/settings/admin.php b/settings/admin.php
index 2364fb3aae0..e0d3a907f47 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 90b1de68370..1bbb20efa00 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 a51b9aa16e2..2f4461589da 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -239,6 +239,11 @@ if ($_['cronErrors']) {
value="1" />
+ />
+
+
/>