| @@ 365-375 (lines=11) @@ | ||
| 362 | * |
|
| 363 | * @internal |
|
| 364 | */ |
|
| 365 | public function getAppInfo($appId) { |
|
| 366 | $appInfo = \OC_App::getAppInfo($appId); |
|
| 367 | if ($appInfo === null) { |
|
| 368 | return null; |
|
| 369 | } |
|
| 370 | if (!isset($appInfo['version'])) { |
|
| 371 | // read version from separate file |
|
| 372 | $appInfo['version'] = \OC_App::getAppVersion($appId); |
|
| 373 | } |
|
| 374 | return $appInfo; |
|
| 375 | } |
|
| 376 | ||
| 377 | /** |
|
| 378 | * Returns a list of apps incompatible with the given version |
|
| @@ 1066-1078 (lines=13) @@ | ||
| 1063 | * |
|
| 1064 | * @return bool |
|
| 1065 | */ |
|
| 1066 | public static function rememberLoginAllowed() { |
|
| 1067 | $apps = OC_App::getEnabledApps(); |
|
| 1068 | ||
| 1069 | foreach ($apps as $app) { |
|
| 1070 | $appInfo = OC_App::getAppInfo($app); |
|
| 1071 | if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') { |
|
| 1072 | return false; |
|
| 1073 | } |
|
| 1074 | } |
|
| 1075 | return true; |
|
| 1076 | } |
|
| 1077 | ||
| 1078 | /** |
|
| 1079 | * Check if the user has administration privileges, redirects to home if not |
|
| 1080 | * |
|
| 1081 | * @return null|boolean $groups where the current user is subadmin |
|