Class: Decidim::Admin::ExpireImpersonationJob
- Inherits:
-
ApplicationJob
- Object
- Decidim::ApplicationJob
- ApplicationJob
- Decidim::Admin::ExpireImpersonationJob
- Defined in:
- app/jobs/decidim/admin/expire_impersonation_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(user, current_user) ⇒ Object
8 9 10 11 12 13 |
# File 'app/jobs/decidim/admin/expire_impersonation_job.rb', line 8 def perform(user, current_user) impersonation_log = Decidim::ImpersonationLog.where(admin: current_user, user:).active.first return unless impersonation_log impersonation_log.expire! end |