diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-30 14:16:16 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-30 14:29:46 +0100 |
commit | 7e7dd92f6b7c255ea7a94cbcf0e2e762ef49f8ee (patch) | |
tree | 6c13ea54580a5015f117d1b038b1120960e45479 /settings/application.php | |
parent | 734dcc82dd48bc06a2152a45f9d62546e122b822 (diff) | |
download | nextcloud-server-7e7dd92f6b7c255ea7a94cbcf0e2e762ef49f8ee.tar.gz nextcloud-server-7e7dd92f6b7c255ea7a94cbcf0e2e762ef49f8ee.zip |
Add unit tests
Diffstat (limited to 'settings/application.php')
-rw-r--r-- | settings/application.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/settings/application.php b/settings/application.php index d5516a1eefd..3b2c77ab849 100644 --- a/settings/application.php +++ b/settings/application.php @@ -1,7 +1,7 @@ <?php /** * @author Lukas Reschke - * @copyright 2014 Lukas Reschke lukas@owncloud.com + * @copyright 2014-2015 Lukas Reschke lukas@owncloud.com * * This file is licensed under the Affero General Public License version 3 or * later. @@ -91,7 +91,8 @@ class Application extends App { $c->query('Mail'), $c->query('DefaultMailAddress'), $c->query('URLGenerator'), - $c->query('OCP\\App\\IAppManager') + $c->query('OCP\\App\\IAppManager'), + $c->query('SubAdminOfGroups') ); }); $container->registerService('LogSettingsController', function(IContainer $c) { @@ -145,6 +146,10 @@ class Application extends App { $container->registerService('IsSubAdmin', function(IContainer $c) { return \OC_Subadmin::isSubAdmin(\OC_User::getUser()); }); + /** FIXME: Remove once OC_SubAdmin is non-static and mockable */ + $container->registerService('SubAdminOfGroups', function(IContainer $c) { + return \OC_SubAdmin::getSubAdminsGroups(\OC_User::getUser()); + }); $container->registerService('Mail', function(IContainer $c) { return new \OC_Mail; }); |