Skip to content
Snippets Groups Projects
Unverified Commit 931c68c0 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Do not show 'Get your own free account' on services under subscription

parent a1cc2b21
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,7 @@ use OC\Template\JSConfigHelper; ...@@ -43,6 +43,7 @@ use OC\Template\JSConfigHelper;
use OC\Template\SCSSCacher; use OC\Template\SCSSCacher;
use OCP\Defaults; use OCP\Defaults;
use OC\AppFramework\Http\Request; use OC\AppFramework\Http\Request;
use OCP\Support\Subscription\IRegistry;
class TemplateLayout extends \OC_Template { class TemplateLayout extends \OC_Template {
...@@ -134,7 +135,14 @@ class TemplateLayout extends \OC_Template { ...@@ -134,7 +135,14 @@ class TemplateLayout extends \OC_Template {
parent::__construct('core', 'layout.public'); parent::__construct('core', 'layout.public');
$this->assign( 'appid', $appId ); $this->assign( 'appid', $appId );
$this->assign('bodyid', 'body-public'); $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 { } else {
parent::__construct('core', 'layout.base'); parent::__construct('core', 'layout.base');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment