Sha256: 562dec313a19a67b109d7165b60ef77a1a1f7aa34218575f3faf6f11509c5409

Contents?: true

Size: 778 Bytes

Versions: 87

Compression:

Stored size: 778 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)
          key == "name"
        end

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

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
chef-14.15.6 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.15.6-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.29 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.29-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.25-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.25 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.14-universal-mingw32 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.14.14 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.13.11 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.12.9 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.12.3 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-13.12.14 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.11.21 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.10.9 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.9.13 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.8.12 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.7.17 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-13.12.3 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-14.6.47 lib/chef/chef_fs/data_handler/user_data_handler.rb
chef-13.11.3 lib/chef/chef_fs/data_handler/user_data_handler.rb