Sha256: abbe4c957469321e91e0667f90e49d17ed58234d6028d6bf7bba657f0a12286e

Contents?: true

Size: 682 Bytes

Versions: 13

Compression:

Stored size: 682 Bytes

Contents

require 'chef_fs/data_handler/data_handler_base'

module ChefFS
  module DataHandler
    class AclDataHandler < DataHandlerBase
      def normalize(node, entry)
        # Normalize the order of the keys for easier reading
        result = super(node, {
          'create' => {},
          'read' => {},
          'update' => {},
          'delete' => {},
          'grant' => {}
          })
        result.keys.each do |key|
          result[key] = super(result[key], { 'actors' => [], 'groups' => [] })
          result[key]['actors'] = result[key]['actors'].sort
          result[key]['groups'] = result[key]['groups'].sort
        end
        result
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
knife-essentials-1.3 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.2.1 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.2 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.1.1 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.1 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0.beta5 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0.beta4 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0.beta3 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0.beta2 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-1.0.0.beta1 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-0.9.8 lib/chef_fs/data_handler/acl_data_handler.rb
knife-essentials-0.9.7 lib/chef_fs/data_handler/acl_data_handler.rb