Class: Actions::Middleware::KeepCurrentUser

Inherits:
Dynflow::Middleware
  • Object
show all
Defined in:
app/lib/actions/middleware/keep_current_user.rb

Instance Method Summary collapse

Instance Method Details

#delay(*args) ⇒ Object



19
20
21
# File 'app/lib/actions/middleware/keep_current_user.rb', line 19

def delay(*args)
  pass(*args).tap { store_current_user }
end

#finalizeObject



33
34
35
# File 'app/lib/actions/middleware/keep_current_user.rb', line 33

def finalize
  restore_curent_user { pass }
end

#plan(*args) ⇒ Object



23
24
25
26
27
# File 'app/lib/actions/middleware/keep_current_user.rb', line 23

def plan(*args)
  with_current_user do
    pass(*args).tap { store_current_user }
  end
end

#run(*args) ⇒ Object



29
30
31
# File 'app/lib/actions/middleware/keep_current_user.rb', line 29

def run(*args)
  restore_curent_user { pass(*args) }
end