blob: 4da2f8225d508ab4c5f51e143cbae97b9932ec05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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
|