summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-03-24 13:50:56 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-03-24 13:50:56 +0100
commit5e71d1558a100dcfad1267464fa729eaf98f81b1 (patch)
tree3c19373bee969face48e9d238fe1add9f6cd698f /lib
parent302c19067a5ba81c0aa76ac93733049a2bba374b (diff)
parentb262c30fa9780290ecd0411cee2c4da5c24066b2 (diff)
downloadnextcloud-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.php10
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);
}