Sha256: c4e4c99573f57b247a57059e04a468745043d084797cb91f8cbcbed8279ea86d

Contents?: true

Size: 745 Bytes

Versions: 5

Compression:

Stored size: 745 Bytes

Contents

module Conjur::Policy::Types
  class Update < Base
    attribute :record

    self.description = %(
Make changes to an existing record's attributes.

For example, you can change annotations on a [Resource](#reference/resource), the `uidnumber` of a [User](#reference/user), etc.
)

    self.example = %(
- !user wizard
    annotations:
      color: gray

- !update
    record: !user wizard
      annotations:
        color: white
)
    
    def to_s
      messages = [ "Update #{record}" ]
      (record.custom_attribute_names||[]).each do |k|
        messages.push "  Set field '#{k}'" 
      end
      (record.annotations||{}).each do |k,v|
        messages.push "  Set annotation '#{k}'"
      end
      messages.join("\n")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
conjur-asset-policy-0.8.3 lib/conjur/policy/types/update.rb
conjur-asset-policy-0.8.2 lib/conjur/policy/types/update.rb
conjur-asset-policy-0.8.1 lib/conjur/policy/types/update.rb
conjur-asset-policy-0.8.0 lib/conjur/policy/types/update.rb
conjur-asset-policy-0.7.1 lib/conjur/policy/types/update.rb