diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index 44563f2938c35..a65eaacbd2907 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -159,6 +159,7 @@ public function getConfig(): string { 'version' => implode('.', $this->serverVersion->getVersion()), 'versionstring' => $this->serverVersion->getVersionString(), 'enable_non-accessible_features' => $this->config->getSystemValueBool('enable_non-accessible_features', true), + 'is_enterprise' => Util::isEnterprise(), ]; $array = [ diff --git a/lib/public/Util.php b/lib/public/Util.php index 28da91c9a0f5d..1441d9cff1b91 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -73,6 +73,14 @@ public static function getChannel() { return \OCP\Server::get(ServerVersion::class)->getChannel(); } + /** + * @since 31.0.0 + */ + public static function isEnterprise() { + $versionString = Server::get(ServerVersion::class)->getVersionString(); + return str_contains($versionString, 'Enterprise'); + } + /** * check if sharing is disabled for the current user *