app/commands/decidim/admin/promote_managed_user.rb in decidim-admin-0.23.6 vs app/commands/decidim/admin/promote_managed_user.rb in decidim-admin-0.24.0.rc1

- old
+ new

@@ -28,10 +28,11 @@ def call return broadcast(:invalid) if form.invalid? || !user.managed? || email_already_exists? promote_user invite_user + create_action_log broadcast(:ok) end attr_reader :form, :user, :promoted_by @@ -48,9 +49,18 @@ user.invite!(promoted_by) end def email_already_exists? Decidim::User.where(email: form.email.downcase).any? + end + + def create_action_log + Decidim.traceability.perform_action!( + "promote", + user, + form.current_user, + visibility: "admin-only" + ) end end end end