Sha256: 1e86a4e9988568ccdfda8c846d0e41a6b40d42911b80804e75a1dd706975c232

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

require 'virtus'
module Ixtlan
  module Guard
    class Action   
      include Virtus

      attribute :name, String
      attribute :associations, Array[String]
    end
    class Permission   
      include Virtus

      attribute :resource, String
      attribute :actions, Array[Action], :default => []
      attribute :deny, Boolean, :deafult => false
      attribute :associations, Array[String]
    end
    #TODO
    class GuardException < Exception; end
    class PermissionDenied < GuardException; end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ixtlan-guard-0.9.0 lib/ixtlan/guard/models.rb~