app/controllers/ops_controller/ops_rbac.rb
# Set form variables for role edit
Set form variables for role edit
Set form variables for role edit
def rbac_role_set_form_vars
    @edit = {}
    @edit[:role_id] = @record.id if @sb[:typ] != "copy"
    @edit[:new] = {}
    @edit[:current] = {}
    @edit[:key] = "rbac_role_edit__#{@edit[:role_id] || "new"}"
    @edit[:new][:name] = @record.name
    vmr = @record.settings.fetch_path(:restrictions, :vms) if @record.settings
    @edit[:new][:vm_restriction] = vmr || :none
    @edit[:new][:features] = rbac_expand_features(@record.feature_identifiers, MiqProductFeature.feature_root).sort
    @edit[:current] = copy_hash(@edit[:new])
    @role_features = @record.feature_identifiers.sort
    @features_tree = rbac_build_features_tree
  end
def rbac_role_set_form_vars @edit = { } @edit [ :role_id ] = @record . id if @sb [ :typ ] != "copy" @edit [ :new ] = { } @edit [ :current ] = { } @edit [ :key ] = "rbac_role_edit__#{@edit[:role_id] || "new"}" @edit [ :new ] [ :name ] = @record . name vmr = @record . settings . fetch_path ( :restrictions , :vms ) if @record . settings @edit [ :new ] [ :vm_restriction ] = vmr || :none @edit [ :new ] [ :features ] = rbac_expand_features ( @record . feature_identifiers , MiqProductFeature . feature_root ) . sort @edit [ :current ] = copy_hash ( @edit [ :new ] ) @role_features = @record . feature_identifiers . sort @features_tree = rbac_build_features_tree end
Set form variables for role edit
Set form variables for role edit