app/controllers/ops_controller/ops_rbac.rb
# Validate some of the role fields
Validate some of the role fields
Validate some of the role fields
def rbac_group_validate?
    valid = true
    if @edit[:new][:filters].empty?
      @assigned_filters = []
    end
    if @edit[:new][:role].nil? || @edit[:new][:role] == ""
      add_flash(_("A User Group must be assigned a Role"), :error)
      valid = false
    end
    valid
  end
def rbac_group_validate? valid = true if @edit [ :new ] [ :filters ] . empty? @assigned_filters = [ ] end if @edit [ :new ] [ :role ] . nil? || @edit [ :new ] [ :role ] == "" add_flash ( _ ( "A User Group must be assigned a Role" ) , :error ) valid = false end valid end
Validate some of the role fields
Validate some of the role fields