Sha256: 278e81ffe97190e4de602de472df4396c5e15aaeebde7ef23df7b9aa33884c76

Contents?: true

Size: 598 Bytes

Versions: 15

Compression:

Stored size: 598 Bytes

Contents

require 'chef_fs/data_handler/data_handler_base'

module ChefFS
  module DataHandler
    class UserDataHandler < DataHandlerBase
      def normalize(user, entry)
        super(user, {
          'name' => remove_dot_json(entry.name),
          'admin' => false,
          'json_class' => 'Chef::WebUIUser',
          'chef_type' => 'webui_user',
          'salt' => nil,
          'password' => nil,
          'openid' => nil
        })
      end

      def preserve_key(key)
        return key == 'name'
      end

      # There is no chef_class for users, nor does to_ruby work.
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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