summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-10-25 13:54:39 +0200
committerBackportbot <backportbot-noreply@rullzer.com>2019-10-30 09:55:32 +0000
commitbc6442c46b6e6ff923ef4ab8d872668b08e647d9 (patch)
tree243df11ae199c0268ea478804700a8cc1e802c6e
parent767455f49cb63457b2c2181d2a101c54bda1126f (diff)
downloadnextcloud-server-bc6442c46b6e6ff923ef4ab8d872668b08e647d9.tar.gz
nextcloud-server-bc6442c46b6e6ff923ef4ab8d872668b08e647d9.zip
Do not show 'Get your own free account' on services under subscription
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/TemplateLayout.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index e7809b5a39d..6de6b33172c 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -43,6 +43,7 @@ use OC\Template\JSConfigHelper;
use OC\Template\SCSSCacher;
use OCP\Defaults;
use OC\AppFramework\Http\Request;
+use OCP\Support\Subscription\IRegistry;
class TemplateLayout extends \OC_Template {
@@ -134,7 +135,14 @@ class TemplateLayout extends \OC_Template {
parent::__construct('core', 'layout.public');
$this->assign( 'appid', $appId );
$this->assign('bodyid', 'body-public');
- $this->assign('showSimpleSignUpLink', $this->config->getSystemValue('simpleSignUpLink.shown', true) !== false);
+
+ /** @var IRegistry $subscription */
+ $subscription = \OC::$server->query(IRegistry::class);
+ $showSimpleSignup = $this->config->getSystemValueBool('simpleSignUpLink.shown', true);
+ if ($showSimpleSignup && $subscription->delegateHasValidSubscription()) {
+ $showSimpleSignup = false;
+ }
+ $this->assign('showSimpleSignUpLink', $showSimpleSignup);
} else {
parent::__construct('core', 'layout.base');