mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 20:03:11 +00:00
on ne peut faire des recherches que si on en a le droit
This commit is contained in:
parent
ec0b47ac05
commit
e68e2634ea
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,7 @@ from django.contrib.auth.decorators import login_required
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from users.models import User, Adherent, Club, Ban, Whitelist
|
from users.models import User, Adherent, Club, Ban, Whitelist
|
||||||
from machines.models import Machine
|
from machines.models import Machine
|
||||||
|
from cotisations.models import Cotisation
|
||||||
from topologie.models import Port, Switch, Room
|
from topologie.models import Port, Switch, Room
|
||||||
from cotisations.models import Facture
|
from cotisations.models import Facture
|
||||||
from preferences.models import GeneralOption
|
from preferences.models import GeneralOption
|
||||||
|
@ -44,6 +45,7 @@ from search.forms import (
|
||||||
initial_choices
|
initial_choices
|
||||||
)
|
)
|
||||||
from re2o.utils import SortTable
|
from re2o.utils import SortTable
|
||||||
|
from re2o.acl import can_view_all
|
||||||
|
|
||||||
|
|
||||||
def is_int(variable):
|
def is_int(variable):
|
||||||
|
@ -347,6 +349,7 @@ def get_words(query):
|
||||||
return words
|
return words
|
||||||
|
|
||||||
|
|
||||||
|
@can_view_all(User, Machine, Cotisation)
|
||||||
def get_results(query, request, params):
|
def get_results(query, request, params):
|
||||||
"""The main function of the search procedure. It gather the filters for
|
"""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
|
each of the different words of the query and concatenate them into a
|
||||||
|
|
Loading…
Reference in a new issue