Merge pull request #7183 from robbieaverill/pulls/4.0/fix-log-in-as-someone-else

FIX Log in as someone else returns user back to login screen
This commit is contained in:
Daniel Hensby 2017-07-18 11:54:33 +01:00 committed by GitHub
commit d59e2dbe5b
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(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
And I go to "/admin/"
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