app/controllers/ops_controller/ops_rbac.rb
# Set role record variables to new values
Set role record variables to new values
Set role record variables to new values
def rbac_role_set_record_vars(role)
    role.name = @edit[:new][:name]
    role.settings ||= {}
    if @edit[:new][:vm_restriction] == :none
      role.settings.delete(:restrictions)
    else
      role.settings[:restrictions] = {:vms => @edit[:new][:vm_restriction]}
    end
    role.settings = nil if role.settings.empty?
  end
def rbac_role_set_record_vars ( role ) role . name = @edit [ :new ] [ :name ] role . settings ||= { } if @edit [ :new ] [ :vm_restriction ] == :none role . settings . delete ( :restrictions ) else role . settings [ :restrictions ] = { :vms => @edit [ :new ] [ :vm_restriction ] } end role . settings = nil if role . settings . empty? end
Set role record variables to new values
Set role record variables to new values
role
<not_specific>