FIX Log in as someone else returns user back to login screen

This commit is contained in:
Robbie Averill 2017-07-18 17:15:58 +12:00
parent ed0ed89865
commit a5ca4ecb59
2 changed files with 9 additions and 1 deletions

View File

@ -109,6 +109,6 @@ class LogoutHandler extends RequestHandler
return $this->redirect($backURL); return $this->redirect($backURL);
} }
return $this->redirect(Director::absoluteBaseURL()); return $this->redirect(Security::config()->get('login_url'));
} }
} }

View File

@ -25,3 +25,11 @@ Feature: Log in
When I press the "Log out" button When I press the "Log out" button
And I go to "/admin/" And I go to "/admin/"
Then I should see a log-in form Then I should see a log-in form
Scenario: Log in as someone else
Given I am logged in with "ADMIN" permissions
When I go to "/Security/login"
Then the response should contain "Log in as someone else"
When I press the "Log in as someone else" button
Then I should see a log-in form