Skip to content

Commit

Permalink
Save default roles to server settings so they are accurate in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Jun 29, 2017
1 parent 164bfc4 commit a3e5404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/miq_server/role_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def sync_assigned_roles
end

def ensure_default_roles
self.role = (ENV["DEFAULT_ROLES"] || ::Settings.server.role) if role.blank?
MiqServer.my_server.add_settings_for_resource(:server => {:role => ENV["DEFAULT_ROLES"]}) if role.blank? && ENV["DEFAULT_ROLES"].present?
sync_assigned_roles
end

def deactivate_all_roles
Expand Down

0 comments on commit a3e5404

Please sign in to comment.