From cdfea5dba0646fe8e14551fc32cfc283a8520d74 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Tue, 18 Jun 2019 12:12:38 +0300 Subject: [PATCH] Add the /eulogin route as a separate instance that doesn't replace the default route. --- oe_authentication.routing.yml | 8 ++++++++ src/Routing/RouteSubscriber.php | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/oe_authentication.routing.yml b/oe_authentication.routing.yml index af56c4a..932c34d 100644 --- a/oe_authentication.routing.yml +++ b/oe_authentication.routing.yml @@ -1,3 +1,11 @@ +oe_authentication.login: + path: '/eulogin' + defaults: + _controller: '\Drupal\cas\Controller\ForceLoginController::forceLogin' + requirements: + _access: 'TRUE' + options: + _maintenance_access: TRUE oe_authentication.settings: path: '/admin/config/system/oe_authentication' defaults: diff --git a/src/Routing/RouteSubscriber.php b/src/Routing/RouteSubscriber.php index e36c5e5..0da4e99 100644 --- a/src/Routing/RouteSubscriber.php +++ b/src/Routing/RouteSubscriber.php @@ -48,11 +48,6 @@ protected function alterRoutes(RouteCollection $collection): void { ]); } - // Replace default cas login route with eulogin one. - if ($route = $collection->get('cas.login')) { - $route->setPath('/eulogin'); - } - // Replace route title for the Bulk Add CAS Users route. if ($route = $collection->get('cas.bulk_add_cas_users')) { $route->setDefault('_title', 'Bulk Add EU Login Users');