Browse Source
allow admin to disable sharing for specific groups of users
remotes/origin/ldap_group_count
allow admin to disable sharing for specific groups of users
remotes/origin/ldap_group_count
20 changed files with 352 additions and 23 deletions
-
4apps/files/css/files.css
-
32apps/files_sharing/js/share.js
-
14apps/files_sharing/lib/permissions.php
-
8apps/files_sharing/lib/sharedstorage.php
-
72apps/files_sharing/tests/api.php
-
2apps/files_sharing/tests/base.php
-
4apps/files_sharing/tests/proxy.php
-
1core/js/config.php
-
19lib/private/files/cache/permissions.php
-
4lib/private/files/storage/common.php
-
10lib/private/share/share.php
-
23lib/private/util.php
-
9lib/public/util.php
-
18settings/admin.php
-
18settings/ajax/excludegroups.php
-
9settings/css/settings.css
-
49settings/js/admin.js
-
2settings/routes.php
-
22settings/templates/admin.php
-
55tests/lib/util.php
@ -0,0 +1,18 @@ |
|||
<?php |
|||
OC_JSON::checkSubAdminUser(); |
|||
OCP\JSON::callCheck(); |
|||
|
|||
$selectedGroups = isset($_POST["selectedGroups"]) ? json_decode($_POST["selectedGroups"]) : array(); |
|||
$changedGroup = isset($_POST["changedGroup"]) ? $_POST["changedGroup"] : ''; |
|||
|
|||
if ($changedGroup !== '') { |
|||
if(($key = array_search($changedGroup, $selectedGroups)) !== false) { |
|||
unset($selectedGroups[$key]); |
|||
} else { |
|||
$selectedGroups[] = $changedGroup; |
|||
} |
|||
} else { |
|||
\OCP\Util::writeLog('core', 'Can not update list of excluded groups from sharing, parameter missing', \OCP\Util::WARN); |
|||
} |
|||
|
|||
\OC_Appconfig::setValue('core', 'shareapi_exclude_groups_list', implode(',', $selectedGroups)); |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue