mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 01:28:08 -04:00
better name for getAppsEnabledForUser
This commit is contained in:
parent
434835b326
commit
04628cf368
4 changed files with 4 additions and 4 deletions
|
|
@ -220,7 +220,7 @@ class OC_App {
|
|||
if (is_null($user)) {
|
||||
$apps = $appManager->getInstalledApps();
|
||||
} else {
|
||||
$apps = $appManager->getAppsEnabledForUser($user);
|
||||
$apps = $appManager->getEnabledAppsForUser($user);
|
||||
}
|
||||
$apps = array_filter($apps, function ($app) {
|
||||
return $app !== 'files';//we add this manually
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class AppManager implements IAppManager {
|
|||
* @param \OCP\IUser $user
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAppsEnabledForUser(IUser $user) {
|
||||
public function getEnabledAppsForUser(IUser $user) {
|
||||
$apps = $this->getInstalledAppsValues();
|
||||
$appsForUser = array_filter($apps, function ($enabled) use ($user) {
|
||||
return $this->checkAppForUser($enabled, $user);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ interface IAppManager {
|
|||
* @param \OCP\IUser $user
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAppsEnabledForUser(IUser $user);
|
||||
public function getEnabledAppsForUser(IUser $user);
|
||||
|
||||
/**
|
||||
* List all installed apps
|
||||
|
|
|
|||
|
|
@ -222,6 +222,6 @@ class Manager extends \PHPUnit_Framework_TestCase {
|
|||
$appConfig->setValue('test2', 'enabled', 'no');
|
||||
$appConfig->setValue('test3', 'enabled', '["foo"]');
|
||||
$appConfig->setValue('test4', 'enabled', '["asd"]');
|
||||
$this->assertEquals(['test1', 'test3'], $manager->getAppsEnabledForUser($user));
|
||||
$this->assertEquals(['test1', 'test3'], $manager->getEnabledAppsForUser($user));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue