Do not autodisable authentication apps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
853a1a586a
commit
a4938d6f48
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue