Method: Chef::WebUIUser.admin_exist

Defined in:
lib/chef/webui_user.rb

.admin_existObject

return true if an admin user exists. this is pretty expensive (O(n)), should think of a better way (nuo)



206
207
208
209
210
211
212
213
214
215
# File 'lib/chef/webui_user.rb', line 206

def self.admin_exist
  users = self.cdb_list
  users.each do |u|
    user = self.cdb_load(u)
    if user.admin
      return user.name
    end
  end
  nil
end