Merge pull request #1103 from taigaio/allow-to-relogin-through-url

Allow to force re-login through url
stable
David Barragán Merino 2016-09-20 12:18:13 +02:00 committed by GitHub
commit f36b298e46
1 changed files with 6 additions and 5 deletions

View File

@ -37,12 +37,13 @@ class LoginPage
constructor: (currentUserService, $location, $navUrls, $routeParams) ->
if currentUserService.isAuthenticated()
url = $navUrls.resolve("home")
if $routeParams['next']
url = $routeParams['next']
$location.search('next', null)
if not $routeParams['force_login']
url = $navUrls.resolve("home")
if $routeParams['next']
url = decodeURIComponent($routeParams['next'])
$location.search('next', null)
$location.path(url)
$location.url(url)
module.controller('LoginPage', LoginPage)