diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-03-24 13:50:56 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-03-24 13:50:56 +0100 |
commit | 5e71d1558a100dcfad1267464fa729eaf98f81b1 (patch) | |
tree | 3c19373bee969face48e9d238fe1add9f6cd698f /lib | |
parent | 302c19067a5ba81c0aa76ac93733049a2bba374b (diff) | |
parent | b262c30fa9780290ecd0411cee2c4da5c24066b2 (diff) | |
download | nextcloud-server-5e71d1558a100dcfad1267464fa729eaf98f81b1.tar.gz nextcloud-server-5e71d1558a100dcfad1267464fa729eaf98f81b1.zip |
Merge pull request #15149 from owncloud/fix-enable-for-group
Correctly get array of groups and send OCP\IGroup objects to enable meth...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/app.php | 10 |
1 files changed, 9 insertions, 1 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); } |