Sha256: 43f4307217894ea35ec54ba749addaea2b2799a162950212d9eee0de4e7ae02c

Contents?: true

Size: 484 Bytes

Versions: 34

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Verifications
    # A command to Destroy the Authorization of a user.
    class DestroyUserAuthorization < Rectify::Command
      def initialize(authorization)
        @authorization = authorization
      end

      def call
        return broadcast(:invalid) unless authorization

        authorization.destroy!

        broadcast(:ok, authorization)
      end

      private

      attr_reader :authorization
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
decidim-verifications-0.26.10 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.9 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.8 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.7 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.5 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.4 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.3 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.2 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.1 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.0 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.0.rc2 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.26.0.rc1 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.2 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.1 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.0 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.0.rc4 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.0.rc3 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.0.rc2 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.25.0.rc1 app/commands/decidim/verifications/destroy_user_authorization.rb
decidim-verifications-0.24.3 app/commands/decidim/verifications/destroy_user_authorization.rb