]> source.dussan.org Git - nextcloud-server.git/commitdiff
feat: Add check for enterprise
authorChristopher Ng <chrng8@gmail.com>
Fri, 20 Sep 2024 21:19:02 +0000 (14:19 -0700)
committerChristopher Ng <chrng8@gmail.com>
Fri, 20 Sep 2024 21:19:02 +0000 (14:19 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
lib/public/Util.php

index 28da91c9a0f5d05f63519e05228bc849e9417783..1441d9cff1b91326ad2fd10e4cdb73c95ffefb6f 100644 (file)
@@ -73,6 +73,14 @@ class Util {
                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
         *