Fixed issue #1859 - Login fails after fast logout right after previous login.
This commit is contained in:
parent
b103ffb9fb
commit
80b535df0f
6 changed files with 39 additions and 21 deletions
|
@ -35,7 +35,12 @@ Style/IfUnlessModifier:
|
|||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
||||
Enabled: false
|
||||
|
||||
Style/TrailingCommaInLiteral:
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
Description: 'Checks for trailing comma in array and hash literals.'
|
||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
||||
Enabled: false
|
||||
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
Description: 'Checks for trailing comma in array and hash literals.'
|
||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
||||
Enabled: false
|
||||
|
@ -199,7 +204,7 @@ Metrics/ModuleLength:
|
|||
Metrics/BlockLength:
|
||||
Enabled: false
|
||||
|
||||
Lint/RescueWithoutErrorClass:
|
||||
Style/RescueStandardError:
|
||||
Enabled: false
|
||||
|
||||
Rails/ApplicationRecord:
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -1,8 +1,8 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
# core - base
|
||||
ruby '2.4.2'
|
||||
gem 'rails', '5.1.4'
|
||||
ruby '2.4.3'
|
||||
gem 'rails', '5.1.5'
|
||||
|
||||
# core - rails additions
|
||||
gem 'activerecord-session_store'
|
||||
|
|
|
@ -16,6 +16,8 @@ class App.TicketCreate extends App.Controller
|
|||
|
||||
@formId = App.ControllerForm.formId()
|
||||
|
||||
@queueKey = "TicketCreate#{@taskKey}"
|
||||
|
||||
# remember split info if exists
|
||||
@split = ''
|
||||
if @ticket_id && @article_id
|
||||
|
@ -30,7 +32,7 @@ class App.TicketCreate extends App.Controller
|
|||
# rerender view, e. g. on langauge change
|
||||
@bind('ui:rerender', =>
|
||||
return if !@authenticateCheck()
|
||||
@render()
|
||||
@renderQueue()
|
||||
)
|
||||
|
||||
# listen to rerender sidebars
|
||||
|
@ -126,13 +128,13 @@ class App.TicketCreate extends App.Controller
|
|||
"#ticket/create/id/#{@id}"
|
||||
|
||||
show: =>
|
||||
@navupdate "#ticket/create/id/#{@id}#{@split}", type: 'menu'
|
||||
@navupdate("#ticket/create/id/#{@id}#{@split}", type: 'menu')
|
||||
@autosaveStart()
|
||||
@bind('ticket_create_rerender', (template) => @render(template))
|
||||
@bind('ticket_create_rerender', (template) => @renderQueue(template))
|
||||
|
||||
hide: =>
|
||||
@autosaveStop()
|
||||
@unbind('ticket_create_rerender', (template) => @render(template))
|
||||
@unbind('ticket_create_rerender', (template) => @renderQueue(template))
|
||||
|
||||
changed: =>
|
||||
formCurrent = @formParam( @$('.ticket-create') )
|
||||
|
@ -174,9 +176,9 @@ class App.TicketCreate extends App.Controller
|
|||
|
||||
if _.isEmpty(params.ticket_id) && _.isEmpty(params.article_id)
|
||||
if !_.isEmpty(params.customer_id)
|
||||
@render(options: { customer_id: params.customer_id })
|
||||
@renderQueue(options: { customer_id: params.customer_id })
|
||||
return
|
||||
@render()
|
||||
@renderQueue()
|
||||
return
|
||||
|
||||
# fetch split ticket data
|
||||
|
@ -213,11 +215,19 @@ class App.TicketCreate extends App.Controller
|
|||
t.attachments = data.attachments
|
||||
|
||||
# render page
|
||||
@render(options: t)
|
||||
@renderQueue(options: t)
|
||||
)
|
||||
|
||||
render: (template = {}) ->
|
||||
renderQueue: (template = {}) =>
|
||||
localeRender = =>
|
||||
@render(options: template)
|
||||
@render()
|
||||
App.QueueManager.add(@queueKey, localeRender)
|
||||
return if !@formMeta
|
||||
App.QueueManager.run(@queueKey)
|
||||
|
||||
render: (template = {}) ->
|
||||
return if !@formMeta
|
||||
# get params
|
||||
params = @prefilledParams || {}
|
||||
if template && !_.isEmpty(template.options)
|
||||
|
|
|
@ -155,7 +155,7 @@ class App.OnlineNotificationWidget extends App.Controller
|
|||
fetch: =>
|
||||
load = =>
|
||||
@fetchedData = true
|
||||
App.OnlineNotification.fetchFull(load, clear: true)
|
||||
App.OnlineNotification.fetchFull(load, clear: true, force: true)
|
||||
|
||||
toggle: =>
|
||||
if @shown
|
||||
|
|
|
@ -175,7 +175,10 @@ class _taskManagerSingleton extends App.Controller
|
|||
@queueRunning = true
|
||||
loop
|
||||
param = @queue.shift()
|
||||
@executeSingel(param)
|
||||
try
|
||||
@executeSingel(param)
|
||||
catch e
|
||||
@log 'error', 'executeSingel task:', param.key, e
|
||||
if !@queue[0]
|
||||
@queueRunning = false
|
||||
break
|
||||
|
|
|
@ -302,7 +302,7 @@ set new attributes of model (remove already available attributes)
|
|||
url: url
|
||||
processData: true,
|
||||
success: (data, status, xhr) =>
|
||||
@FULL_FETCH[ data.id ] = false
|
||||
@FULL_FETCH[id] = false
|
||||
|
||||
App.Log.debug('Model', "got #{@className}.find(#{id}) from server", data)
|
||||
|
||||
|
@ -315,15 +315,15 @@ set new attributes of model (remove already available attributes)
|
|||
App[@className].refresh(data)
|
||||
|
||||
# execute callbacks
|
||||
if @FULL_CALLBACK[ data.id ]
|
||||
for key, callback of @FULL_CALLBACK[ data.id ]
|
||||
if @FULL_CALLBACK[data.id]
|
||||
for key, callback of @FULL_CALLBACK[data.id]
|
||||
callback( @_fillUp( App[@className].find(data.id) ) )
|
||||
delete @FULL_CALLBACK[ data.id ][ key ]
|
||||
if _.isEmpty @FULL_CALLBACK[ data.id ]
|
||||
delete @FULL_CALLBACK[ data.id ]
|
||||
delete @FULL_CALLBACK[data.id][key]
|
||||
if _.isEmpty @FULL_CALLBACK[data.id]
|
||||
delete @FULL_CALLBACK[data.id]
|
||||
|
||||
error: (xhr, statusText, error) =>
|
||||
@FULL_FETCH[ data.id ] = false
|
||||
@FULL_FETCH[id] = false
|
||||
App.Log.error('Model', statusText, error, url)
|
||||
)
|
||||
subscribeId
|
||||
|
|
Loading…
Reference in a new issue