Revision d6189fdc
Correction droits d'accès.
La page principale ne vérifiait pas correctement les droits d'accès et
pouvait refuser l'accès aux administrateurs.
Change-Id: I27300da35c848f0f81c03ebfc377f29cdef0cf90
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/1923
Tested-by: Build system <qa@vigilo-dev.si.c-s.fr>
Reviewed-by: Francois POIROTTE <francois.poirotte@c-s.fr>
vigigraph/controllers/root.py | ||
---|---|---|
11 | 11 |
|
12 | 12 |
|
13 | 13 |
import logging |
14 |
from tg import expose, require |
|
14 |
from tg import expose, require, config
|
|
15 | 15 |
from pylons.i18n import lazy_ugettext as l_, get_lang |
16 | 16 |
from repoze.what.predicates import Any, All, not_anonymous, \ |
17 | 17 |
has_permission, in_group |
... | ... | |
47 | 47 |
@require(All( |
48 | 48 |
not_anonymous(msg=l_("You need to be authenticated")), |
49 | 49 |
Any( |
50 |
in_group('managers'),
|
|
50 |
config.is_manager,
|
|
51 | 51 |
has_permission('vigigraph-access', |
52 | 52 |
msg=l_("You don't have access to VigiGraph")), |
53 | 53 |
) |
Also available in: Unified diff