8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-28 15:42:25 +00:00

[Printer] user.can_view(printer) = user.is_active

This commit is contained in:
Maxime Bombar 2018-10-28 23:10:41 +01:00 committed by root
parent 73ba578c74
commit 832db0c7a9

View file

@ -15,7 +15,7 @@ def can_view(user):
A couple (allowed, msg) where allowed is a boolean which is True if
viewing is granted and msg is a message (can be None).
"""
can = user.has_module_perms('printer')
can = user.is_active
return can, None if can else _("You don't have the right to view Printer"
" application.")