Sha256: dcb932ee3678c92606e49be954c245023add94be991a704696cd340e3691b012

Contents?: true

Size: 760 Bytes

Versions: 4

Compression:

Stored size: 760 Bytes

Contents

# frozen_string_literal: true

require "decidim/direct_verifications/instrumenter"

module Decidim
  module DirectVerifications
    class AuthorizeUsersJob < BaseImportJob
      class NullSession; end

      def process_users
        Rails.logger.info "AuthorizeUsersJob: Authorizing #{emails.count} emails"
        emails.each do |email, data|
          Rails.logger.debug "AuthorizeUsersJob: Authorizing #{email}"
          AuthorizeUser.new(
            email,
            data,
            session,
            organization,
            instrumenter,
            authorization_handler
          ).call
        end
      end

      def type
        :authorized
      end

      private

      def session
        NullSession.new
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-direct_verifications-1.2.1 app/jobs/decidim/direct_verifications/authorize_users_job.rb
decidim-direct_verifications-1.2 app/jobs/decidim/direct_verifications/authorize_users_job.rb
decidim-direct_verifications-1.0.2 app/jobs/decidim/direct_verifications/authorize_users_job.rb
decidim-direct_verifications-1.1 app/jobs/decidim/direct_verifications/authorize_users_job.rb