Sha256: 374c36faf0ee0628d5c197408eccb9150ec02bafcb36db995e30ac8156ac6b68
Contents?: true
Size: 991 Bytes
Versions: 6
Compression:
Stored size: 991 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # Custom ApplicationJob scoped to the admin panel. # class ImportParticipatorySpacePrivateUserCsvJob < ApplicationJob queue_as :exports def perform(email, user_name, privatable_to, current_user) return if email.blank? || user_name.blank? params = { name: user_name, email: email.downcase.strip } private_user_form = ParticipatorySpacePrivateUserForm.from_params(params, privatable_to:) .with_context( current_user:, current_participatory_space: privatable_to ) Decidim::Admin::CreateParticipatorySpacePrivateUser.call(private_user_form, privatable_to, via_csv: true) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems