Compare commits

...

1 Commits

Author SHA1 Message Date
Julius Härtl a4938d6f48
Do not autodisable authentication apps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-04 11:14:45 +02:00
3 changed files with 23 additions and 1 deletions

View File

@ -249,6 +249,20 @@ class AppManager implements IAppManager {
return !empty($protectedTypes);
}
/**
* @param string $appId
* @param string $type
* @return bool
* @since 17.0.0
*/
public function isAppType(string $appId, string $type): bool {
$appData = $this->getAppInfo($appId);
if (isset($appData['types'])) {
return in_array($type, $appData['types'], true);
}
return false;
}
/**
* Enable an app only for specific groups
*

View File

@ -155,7 +155,7 @@ class OC_App {
self::requireAppFile($app);
} catch (Throwable $ex) {
\OC::$server->getLogger()->logException($ex);
if (!\OC::$server->getAppManager()->isShipped($app)) {
if (!\OC::$server->getAppManager()->isShipped($app) && !\OC::$server->getAppManager()->isAppType($app, 'authentication')) {
// Only disable apps which are not shipped
\OC::$server->getAppManager()->disableApp($app);
self::$autoDisabledApps[] = $app;

View File

@ -95,6 +95,14 @@ interface IAppManager {
*/
public function hasProtectedAppType($types);
/**
* @param string $appId
* @param string $type
* @return bool
* @since 17.0.0
*/
public function isAppType(string $appId, string $type): bool;
/**
* Enable an app only for specific groups
*