diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-25 13:54:39 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-25 16:46:32 +0200 |
commit | 931c68c0bf6e69bfde1d7084f3fa5fa975cde703 (patch) | |
tree | 1090cd3139c702d937f742e85e8a9ac48f3dfaa2 /lib/private/TemplateLayout.php | |
parent | a1cc2b21cc4e8abc0aa04938429e73b7b1f66fef (diff) | |
download | nextcloud-server-931c68c0bf6e69bfde1d7084f3fa5fa975cde703.tar.gz nextcloud-server-931c68c0bf6e69bfde1d7084f3fa5fa975cde703.zip |
Do not show 'Get your own free account' on services under subscription
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 94b39e951a5..08f96608c29 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'); |