Sha256: acd0e16087859a492137ce013eb6121d3c360d1a7982456433d5f5122bfd886c

Contents?: true

Size: 378 Bytes

Versions: 13

Compression:

Stored size: 378 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:).active.first
        return unless impersonation_log

        impersonation_log.expire!
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.4 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.29.0 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.3 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.29.0.rc4 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.29.0.rc3 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.29.0.rc2 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.29.0.rc1 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.2 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.1 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.0 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.0.rc5 app/jobs/decidim/admin/expire_impersonation_job.rb
decidim-admin-0.28.0.rc4 app/jobs/decidim/admin/expire_impersonation_job.rb