From c012758a7128f456e0eb74f7dfc58316048b2c7c Mon Sep 17 00:00:00 2001 From: christianbeeznst Date: Tue, 26 Nov 2024 21:27:15 -0500 Subject: [PATCH] User: Hide Registration link and button based on allow_registration setting - refs BT#22225 --- assets/vue/components/Login.vue | 6 +- .../components/layout/TopbarNotLoggedIn.vue | 66 ++++++++++------- .../PlatformConfigurationController.php | 3 + var/vue_templates/components/SidebarLogin.vue | 7 +- .../components/layout/SidebarNotLoggedIn.vue | 74 +++++++++++-------- 5 files changed, 96 insertions(+), 60 deletions(-) diff --git a/assets/vue/components/Login.vue b/assets/vue/components/Login.vue index ed130b2f6d..84b6ec64f4 100644 --- a/assets/vue/components/Login.vue +++ b/assets/vue/components/Login.vue @@ -49,6 +49,7 @@ /> diff --git a/src/CoreBundle/Controller/PlatformConfigurationController.php b/src/CoreBundle/Controller/PlatformConfigurationController.php index fe5d94ebe0..6182d2f916 100644 --- a/src/CoreBundle/Controller/PlatformConfigurationController.php +++ b/src/CoreBundle/Controller/PlatformConfigurationController.php @@ -45,6 +45,9 @@ class PlatformConfigurationController extends AbstractController 'visual_theme' => $this->themeHelper->getVisualTheme(), 'external_authentication' => $this->authenticationConfigHelper->getEnabledProviders(), ]; + + $configuration['settings']['registration.allow_registration'] = $settingsManager->getSetting('registration.allow_registration', true); + $variables = []; if ($this->isGranted('ROLE_USER')) { diff --git a/var/vue_templates/components/SidebarLogin.vue b/var/vue_templates/components/SidebarLogin.vue index b5dae443f5..f8878c0409 100644 --- a/var/vue_templates/components/SidebarLogin.vue +++ b/var/vue_templates/components/SidebarLogin.vue @@ -1,11 +1,12 @@