Fixed issue #1859 - Login fails after fast logout right after previous login.

This commit is contained in:
Martin Edenhofer 2018-03-21 11:28:52 +01:00
parent b103ffb9fb
commit 80b535df0f
6 changed files with 39 additions and 21 deletions

View file

@ -35,7 +35,12 @@ Style/IfUnlessModifier:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
Enabled: false 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.' Description: 'Checks for trailing comma in array and hash literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
Enabled: false Enabled: false
@ -199,7 +204,7 @@ Metrics/ModuleLength:
Metrics/BlockLength: Metrics/BlockLength:
Enabled: false Enabled: false
Lint/RescueWithoutErrorClass: Style/RescueStandardError:
Enabled: false Enabled: false
Rails/ApplicationRecord: Rails/ApplicationRecord:

View file

@ -1,8 +1,8 @@
source 'https://rubygems.org' source 'https://rubygems.org'
# core - base # core - base
ruby '2.4.2' ruby '2.4.3'
gem 'rails', '5.1.4' gem 'rails', '5.1.5'
# core - rails additions # core - rails additions
gem 'activerecord-session_store' gem 'activerecord-session_store'

View file

@ -16,6 +16,8 @@ class App.TicketCreate extends App.Controller
@formId = App.ControllerForm.formId() @formId = App.ControllerForm.formId()
@queueKey = "TicketCreate#{@taskKey}"
# remember split info if exists # remember split info if exists
@split = '' @split = ''
if @ticket_id && @article_id if @ticket_id && @article_id
@ -30,7 +32,7 @@ class App.TicketCreate extends App.Controller
# rerender view, e. g. on langauge change # rerender view, e. g. on langauge change
@bind('ui:rerender', => @bind('ui:rerender', =>
return if !@authenticateCheck() return if !@authenticateCheck()
@render() @renderQueue()
) )
# listen to rerender sidebars # listen to rerender sidebars
@ -126,13 +128,13 @@ class App.TicketCreate extends App.Controller
"#ticket/create/id/#{@id}" "#ticket/create/id/#{@id}"
show: => show: =>
@navupdate "#ticket/create/id/#{@id}#{@split}", type: 'menu' @navupdate("#ticket/create/id/#{@id}#{@split}", type: 'menu')
@autosaveStart() @autosaveStart()
@bind('ticket_create_rerender', (template) => @render(template)) @bind('ticket_create_rerender', (template) => @renderQueue(template))
hide: => hide: =>
@autosaveStop() @autosaveStop()
@unbind('ticket_create_rerender', (template) => @render(template)) @unbind('ticket_create_rerender', (template) => @renderQueue(template))
changed: => changed: =>
formCurrent = @formParam( @$('.ticket-create') ) 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.ticket_id) && _.isEmpty(params.article_id)
if !_.isEmpty(params.customer_id) if !_.isEmpty(params.customer_id)
@render(options: { customer_id: params.customer_id }) @renderQueue(options: { customer_id: params.customer_id })
return return
@render() @renderQueue()
return return
# fetch split ticket data # fetch split ticket data
@ -213,11 +215,19 @@ class App.TicketCreate extends App.Controller
t.attachments = data.attachments t.attachments = data.attachments
# render page # 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 # get params
params = @prefilledParams || {} params = @prefilledParams || {}
if template && !_.isEmpty(template.options) if template && !_.isEmpty(template.options)

View file

@ -155,7 +155,7 @@ class App.OnlineNotificationWidget extends App.Controller
fetch: => fetch: =>
load = => load = =>
@fetchedData = true @fetchedData = true
App.OnlineNotification.fetchFull(load, clear: true) App.OnlineNotification.fetchFull(load, clear: true, force: true)
toggle: => toggle: =>
if @shown if @shown

View file

@ -175,7 +175,10 @@ class _taskManagerSingleton extends App.Controller
@queueRunning = true @queueRunning = true
loop loop
param = @queue.shift() param = @queue.shift()
try
@executeSingel(param) @executeSingel(param)
catch e
@log 'error', 'executeSingel task:', param.key, e
if !@queue[0] if !@queue[0]
@queueRunning = false @queueRunning = false
break break

View file

@ -302,7 +302,7 @@ set new attributes of model (remove already available attributes)
url: url url: url
processData: true, processData: true,
success: (data, status, xhr) => success: (data, status, xhr) =>
@FULL_FETCH[ data.id ] = false @FULL_FETCH[id] = false
App.Log.debug('Model', "got #{@className}.find(#{id}) from server", data) App.Log.debug('Model', "got #{@className}.find(#{id}) from server", data)
@ -323,7 +323,7 @@ set new attributes of model (remove already available attributes)
delete @FULL_CALLBACK[data.id] delete @FULL_CALLBACK[data.id]
error: (xhr, statusText, error) => error: (xhr, statusText, error) =>
@FULL_FETCH[ data.id ] = false @FULL_FETCH[id] = false
App.Log.error('Model', statusText, error, url) App.Log.error('Model', statusText, error, url)
) )
subscribeId subscribeId