Sha256: 97e97e3e0dce54ce6e2879442cb75a5447fa91df6b91841889d625ba2a0c880a

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 Bytes

Contents

module {{namespace_module}}
  module Accounts
    module Destroy
      class Authorizer
        include Shogun::Authorizer
        include Accounts

        def initialize(requester:, resource:)
          if requester
            @requester = requester.account
          end
          @resource = resource
        end

        def allowed?
          @requester == @resource
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shogun-6.4.2 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb
shogun-6.4.1 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb
shogun-6.4.0 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb
shogun-6.3.0 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb
shogun-6.2.3 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb
shogun-6.2.2 scaffold/new/project/lib/namespace/accounts/destroy/authorizer.rb