Go to user sign in page on token failure
This commit is contained in:
@@ -11,10 +11,6 @@ App.ApplicationController = Ember.Controller.extend
|
|||||||
@set 'notice', null
|
@set 'notice', null
|
||||||
openDebugger: ->
|
openDebugger: ->
|
||||||
debugger
|
debugger
|
||||||
evalDebugString: ->
|
|
||||||
if text = $('#debug-eval-string')
|
|
||||||
$('.debug-info').append eval(text)
|
|
||||||
$('.debug-info').append "\n"
|
|
||||||
|
|
||||||
currentPathDidChange: (->
|
currentPathDidChange: (->
|
||||||
@set 'notice', ''
|
@set 'notice', ''
|
||||||
|
|||||||
@@ -1,2 +1,10 @@
|
|||||||
App.SettingsController = Ember.Controller.extend
|
App.SettingsController = Ember.Controller.extend
|
||||||
locales: ['nl', 'en']
|
locales: ['nl', 'en']
|
||||||
|
actions:
|
||||||
|
evalDebugString: ->
|
||||||
|
if text = $('#debug-eval-string')
|
||||||
|
result = eval(text)
|
||||||
|
#result = JSON.stringify(result)
|
||||||
|
result = result.toString()
|
||||||
|
$('.debug-info').append result
|
||||||
|
$('.debug-info').append "\n"
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ App.ApplicationRoute = Ember.Route.extend
|
|||||||
@setCurrentList()
|
@setCurrentList()
|
||||||
|
|
||||||
unauthorized: ->
|
unauthorized: ->
|
||||||
Qstorage.setItem('auth_token', '')
|
Qstorage.removeItem('auth_token')
|
||||||
|
Qstorage.removeItem('user_id')
|
||||||
@controllerFor('application').set 'list', null
|
@controllerFor('application').set 'list', null
|
||||||
@send 'obtain_token'
|
#@send 'obtain_token'
|
||||||
@controllerFor('application').redirect_to 'index', message: 'unauthorized'
|
@controllerFor('application').redirect_to 'sign_in', message: 'unauthorized'
|
||||||
|
|
||||||
handleAuthInfo: (user_id, auth_token)->
|
handleAuthInfo: (user_id, auth_token)->
|
||||||
Qstorage.setItem 'user_id', user_id
|
Qstorage.setItem 'user_id', user_id
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# config valid only for Capistrano 3.1
|
# config valid only for Capistrano 3.1
|
||||||
# lock '3.2.1'
|
# lock '3.2.1'
|
||||||
require 'capistrano/local_precompile'
|
#require 'capistrano/local_precompile'
|
||||||
|
|
||||||
set :application, 'mozo.bar'
|
set :application, 'mozo.bar'
|
||||||
#set :repo_url, 'root@uflows.com:/var/git/qwaiter.git'
|
#set :repo_url, 'root@uflows.com:/var/git/qwaiter.git'
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
0.9.22
|
0.9.23
|
||||||
|
|||||||
@@ -56,17 +56,14 @@ Feature: Sign up as user using facebook
|
|||||||
Then the user should be redirected to the homepage
|
Then the user should be redirected to the homepage
|
||||||
And the newly created user info should be stored in the local storage
|
And the newly created user info should be stored in the local storage
|
||||||
|
|
||||||
@javascript @broken
|
@javascript
|
||||||
Scenario: Expired token
|
Scenario: Expired token
|
||||||
Given there is no user information stored in the local storage
|
Given I am signed in as a user
|
||||||
When the user is on the homepage
|
And the user is on the homepage
|
||||||
|
When the user authentication token changes
|
||||||
|
And the user is on the homepage
|
||||||
Then the user is redirected to the sign in page
|
Then the user is redirected to the sign in page
|
||||||
When the user clicks the sign in via facebook button
|
And there is no user information stored in the local storage
|
||||||
Then the user should be redirected to the homepage
|
|
||||||
When the user has no active session
|
|
||||||
And the user authentication token changes
|
|
||||||
When the user is on the homepage
|
|
||||||
Then the newly created user info should be stored in the local storage
|
|
||||||
|
|
||||||
Scenario: Facebook problem OmniAuth.config.mock_auth[:facebook] = :invalid_credentials
|
Scenario: Facebook problem OmniAuth.config.mock_auth[:facebook] = :invalid_credentials
|
||||||
Scenario: Valid facebook login, but declines information requested by scope
|
Scenario: Valid facebook login, but declines information requested by scope
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Supplier
|
|||||||
- Add qr-print button to tables
|
- Add qr-print button to tables
|
||||||
- Product variants
|
- Product variants
|
||||||
|
|
||||||
|
|
||||||
User
|
User
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ User
|
|||||||
- product variants
|
- product variants
|
||||||
- remove active orders on list close
|
- remove active orders on list close
|
||||||
- fix ajaxError duplicity
|
- fix ajaxError duplicity
|
||||||
|
- rename "I am signed in as a user" to "there is a signed in user"
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
|
|||||||
Reference in New Issue
Block a user