Sha256: 8759979339612fdb36346c010e7c2686e7eb9981933537b9d030a19f17d8f6d3

Contents?: true

Size: 346 Bytes

Versions: 13

Compression:

Stored size: 346 Bytes

Contents

module Arrthorizer
  class Everybody < Arrthorizer::ContextRole
    def applies_to_user?(*args)
      true
    end
  end

  class Nobody < Arrthorizer::ContextRole
    def applies_to_user?(*args)
      false
    end
  end

  class LoggedInUser < Arrthorizer::ContextRole
    def applies_to_user?(user, context)
      !user.nil?
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arrthorizer-0.4.2 lib/arrthorizer/roles.rb
arrthorizer-0.4.1 lib/arrthorizer/roles.rb
arrthorizer-0.3.2 lib/arrthorizer/roles.rb
arrthorizer-0.3.1 lib/arrthorizer/roles.rb
arrthorizer-0.3.0 lib/arrthorizer/roles.rb
arrthorizer-0.2.1 lib/arrthorizer/roles.rb
arrthorizer-0.2.0 lib/arrthorizer/roles.rb
arrthorizer-0.1.3 lib/arrthorizer/roles.rb
arrthorizer-0.1.2 lib/arrthorizer/roles.rb
arrthorizer-0.1.1 lib/arrthorizer/roles.rb
arrthorizer-0.1.0 lib/arrthorizer/roles.rb
arrthorizer-0.1.0.pre2 lib/arrthorizer/roles.rb
arrthorizer-0.1.0.pre lib/arrthorizer/roles.rb