From ec4b0d1e8468302c96173934b60dbad6e0e8a070 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 4 Jan 2017 10:40:14 +0100 Subject: Remove group restrictions when those are not allowed anymore Signed-off-by: Joas Schilling --- lib/private/App/AppManager.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/private/App') diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index fca5c9b87ac..6b819ef7ac1 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -220,6 +220,21 @@ class AppManager implements IAppManager { $this->clearAppsCache(); } + /** + * Whether a list of types contains a protected app type + * + * @param string[] $types + * @return bool + */ + public function hasProtectedAppType($types) { + if (empty($types)) { + return false; + } + + $protectedTypes = array_intersect($this->protectedAppTypes, $types); + return !empty($protectedTypes); + } + /** * Enable an app only for specific groups * -- cgit v1.2.3