Sha256: 7f4de761e844a6b60f452b36f1b9c99b777952e985aec9e17dae87243572db01

Contents?: true

Size: 784 Bytes

Versions: 35

Compression:

Stored size: 784 Bytes

Contents

require 'chef/chef_fs/data_handler/data_handler_base'

class Chef
  module ChefFS
    module DataHandler
      class UserDataHandler < DataHandlerBase
        def normalize(user, entry)
          normalize_hash(user, {
            'name' => remove_dot_json(entry.name),
            'username' => remove_dot_json(entry.name),
            'display_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
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
chef-12.6.0 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.6.0-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.5.1-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.5.1 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.3-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.3 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.2-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.2 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.5.0.alpha.1 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.1-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.1 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0.rc.2 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0.rc.2-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0.rc.0 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.4.0.rc.0-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.3.0-x86-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.3.0 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-12.3.0.rc.0-x86-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb