Skip to content

Commit 1c6f3b1

Browse files
committed
allow converting a client from admin to not admin
1 parent 79fa8ec commit 1c6f3b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chef-server-webui/app/controllers/clients.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def update
8080
@client.create_keys
8181
@private_key = @client.private_key
8282
end
83-
@client.admin(str_to_bool(params[:admin])) unless params[:admin].nil?
83+
params[:admin] ? @client.admin(true) : @client.admin(false)
8484
@client.save
8585
@_message = @private_key.nil? ? { :notice => "Updated Client" } : { :notice => "Created Client #{@client.name}. Please copy the following private key as the client's validation key." }
8686
render :show

0 commit comments

Comments
 (0)