Sha256: 82bafdff54e781d354e9fe4f8fb1784fdb6af3b57cfaf3569191b377043c70d0

Contents?: true

Size: 383 Bytes

Versions: 31

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    class ExpireImpersonationJob < ApplicationJob
      queue_as :default

      def perform(user, current_user)
        impersonation_log = Decidim::ImpersonationLog.where(admin: current_user, user: user).active.first
        return unless impersonation_log

        impersonation_log.expire!
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-admin-0.27.9 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.8 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.7 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.6 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.10 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.9 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.5 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.8 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.4 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.3 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.7 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.5 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.2 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.1 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.4 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.0 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.3 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.0.rc2 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.27.0.rc1 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.26.2 app/jobs/decidim/admin/expire_impersonation_job.rb