update security handling for user namespace
This commit is contained in:
@@ -13,7 +13,9 @@ window.Quser=
|
||||
$.getJSON(data_host + '/user/list_info.json?' + authentication_string, (res) -> Quser.handle_active_list_default_actions(res))
|
||||
handle_active_list: (callback) ->
|
||||
$.getJSON(data_host + '/user/list_info.json?' + authentication_string, (res) ->
|
||||
if !res.list_active
|
||||
if(res.ok == false && res.status && res.status == 401)
|
||||
direct_to_site('obtain_user_token')
|
||||
else if !res.list_active
|
||||
redirect_to 'user_root', {list_closed: 'true'}
|
||||
return
|
||||
window.active_list = res
|
||||
@@ -22,6 +24,9 @@ window.Quser=
|
||||
)
|
||||
handle_active_list_default_actions: (response)->
|
||||
response ||= {}
|
||||
if(response.ok == false && response.status && response.status == 401)
|
||||
direct_to_site('obtain_user_token')
|
||||
return
|
||||
if response.table_number
|
||||
$('.table-number').text(response.table_number)
|
||||
if response.supplier_name
|
||||
|
||||
Reference in New Issue
Block a user