|
|
|
@ -51,9 +51,9 @@ class RedirectSubscriber implements EventSubscriberInterface { |
|
|
|
$request = $event->getRequest(); |
|
|
|
$request = $event->getRequest(); |
|
|
|
$host = $request->getHost(); |
|
|
|
$host = $request->getHost(); |
|
|
|
$config = $this->configFactory->get('url_permission_redirect.settings'); |
|
|
|
$config = $this->configFactory->get('url_permission_redirect.settings'); |
|
|
|
$protectedDomain = $config->get('protected_domain') ?? 'scholar2-prod.islandarchives.ca'; |
|
|
|
$protectedDomain = $config->get('protected_domain') ?? FALSE; |
|
|
|
|
|
|
|
|
|
|
|
if ($this->currentUser->isAuthenticated() && |
|
|
|
if (protectedDomain && $this->currentUser->isAuthenticated() && |
|
|
|
$this->currentUser->hasPermission('access protected domain')) { |
|
|
|
$this->currentUser->hasPermission('access protected domain')) { |
|
|
|
if ($host !== $protectedDomain) { |
|
|
|
if ($host !== $protectedDomain) { |
|
|
|
$uri = $request->getRequestUri(); |
|
|
|
$uri = $request->getRequestUri(); |
|
|
|
|