summaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-05-13 15:22:18 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-05-22 10:43:44 +0200
commit12338e0ef07c409156fa9cd1008bb981bda20461 (patch)
treefe859814a2321ab98f498a623db39dab892b8153 /settings/admin.php
parent14a953fbe01a3d26e1330ea224ab71928a2f93c1 (diff)
downloadnextcloud-server-12338e0ef07c409156fa9cd1008bb981bda20461.tar.gz
nextcloud-server-12338e0ef07c409156fa9cd1008bb981bda20461.zip
allow admin to disable sharing for specific groups of users
Diffstat (limited to 'settings/admin.php')
-rwxr-xr-xsettings/admin.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
index f9406246e76..699ba97edd5 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -10,6 +10,7 @@ OC_Util::checkAdminUser();
OC_Util::addStyle( "settings", "settings" );
OC_Util::addScript( "settings", "admin" );
OC_Util::addScript( "settings", "log" );
+OC_Util::addScript( 'core', 'multiselect' );
OC_App::setActiveNavigationEntry( "admin" );
$tmpl = new OC_Template( 'settings', 'admin', 'user');
@@ -48,6 +49,23 @@ $tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enable
$tmpl->assign('shareDefaultExpireDateSet', OC_Appconfig::getValue('core', 'shareapi_default_expire_date', 'no'));
$tmpl->assign('shareExpireAfterNDays', OC_Appconfig::getValue('core', 'shareapi_expire_after_n_days', '7'));
$tmpl->assign('shareEnforceExpireDate', OC_Appconfig::getValue('core', 'shareapi_enforce_expire_date', 'no'));
+$excludeGroups = OC_Appconfig::getValue('core', 'shareapi_exclude_groups', 'no') === 'yes' ? true : false;
+$tmpl->assign('shareExcludeGroups', $excludeGroups);
+$allGroups = OC_Group::getGroups();
+$excludedGroupsList = OC_Appconfig::getValue('core', 'shareapi_exclude_groups_list', '');
+$excludedGroups = $excludedGroupsList !== '' ? explode(',', $excludedGroupsList) : array();
+$groups = array();
+foreach ($allGroups as $group) {
+ if (in_array($group, $excludedGroups)) {
+ $groups[$group] = array('gid' => $group,
+ 'excluded' => true);
+ } else {
+ $groups[$group] = array('gid' => $group,
+ 'excluded' => false);
+ }
+}
+ksort($groups);
+$tmpl->assign('groups', $groups);
// Check if connected using HTTPS