diff options
-rw-r--r-- | lib/private/app.php | 10 | ||||
-rw-r--r-- | settings/js/apps.js | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index 1b004154173..dce159d574c 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -269,7 +269,15 @@ class OC_App { $appManager = \OC::$server->getAppManager(); if (!is_null($groups)) { - $appManager->enableAppForGroups($app, $groups); + $groupManager = \OC::$server->getGroupManager(); + $groupsList = []; + foreach ($groups as $group) { + $groupItem = $groupManager->get($group); + if ($groupItem instanceof \OCP\IGroup) { + $groupsList[] = $groupManager->get($group); + } + } + $appManager->enableAppForGroups($app, $groupsList); } else { $appManager->enableApp($app); } diff --git a/settings/js/apps.js b/settings/js/apps.js index 8d8b2ca7398..8431cbd4ff4 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -413,7 +413,7 @@ OC.Settings.Apps = OC.Settings.Apps || { var element = $(this).parent().find('input.enable'); var groups = $(this).val(); if (groups && groups !== '') { - groups = groups.split(','); + groups = groups.split('|'); } else { groups = []; } |