summaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-04 10:40:14 +0100
committerJoas Schilling <coding@schilljs.com>2017-01-04 10:40:14 +0100
commitec4b0d1e8468302c96173934b60dbad6e0e8a070 (patch)
tree4470cfced33f2c7749342599c8f58a94e2a089e0 /lib/private/App
parenta75cfb601ec4d20f2eeddb25d1eb3ba745b71944 (diff)
downloadnextcloud-server-ec4b0d1e8468302c96173934b60dbad6e0e8a070.tar.gz
nextcloud-server-ec4b0d1e8468302c96173934b60dbad6e0e8a070.zip
Remove group restrictions when those are not allowed anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/App')
-rw-r--r--lib/private/App/AppManager.php15
1 files changed, 15 insertions, 0 deletions
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
@@ -221,6 +221,21 @@ class AppManager implements IAppManager {
}
/**
+ * 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
*
* @param string $appId