Sha256: 5b21211a1ffc415ad7a7c2cb6035cefea05c313d1a7e77be682b8484a35bf673

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

module Conjur
  module DSL2
    module Types
      class Permit < Base
        attribute :role, kind: :member
        attribute :privilege, kind: :string, dsl_accessor: true
        attribute :resource, dsl_accessor: true
        attribute :replace, kind: :boolean, singular: true, dsl_accessor: true
        
        include ResourceMemberDSL
        
        def initialize privilege = nil
          self.privilege = privilege
        end
        
        def to_s
          "Permit #{role.role} to '#{privilege}' #{resource}#{role.admin ? ' with grant option' : ''}"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
conjur-asset-dsl2-0.4.2 lib/conjur/dsl2/types/permit.rb
conjur-asset-dsl2-0.3.2 lib/conjur/dsl2/types/permit.rb
conjur-asset-dsl2-0.3.1 lib/conjur/dsl2/types/permit.rb
conjur-asset-dsl2-0.3.0 lib/conjur/dsl2/types/permit.rb