Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit e68e2634 authored by grisel-davy's avatar grisel-davy Committed by chirac

on ne peut faire des recherches que si on en a le droit

parent ec0b47ac
......@@ -33,6 +33,7 @@ from django.contrib.auth.decorators import login_required
from django.db.models import Q
from users.models import User, Adherent, Club, Ban, Whitelist
from machines.models import Machine
from cotisations.models import Cotisation
from topologie.models import Port, Switch, Room
from cotisations.models import Facture
from preferences.models import GeneralOption
......@@ -44,6 +45,7 @@ from search.forms import (
initial_choices
)
from re2o.utils import SortTable
from re2o.acl import can_view_all
def is_int(variable):
......@@ -347,6 +349,7 @@ def get_words(query):
return words
@can_view_all(User, Machine, Cotisation)
def get_results(query, request, params):
"""The main function of the search procedure. It gather the filters for
each of the different words of the query and concatenate them into a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment