Commit 1e47fa16 authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK
Browse files

Rend can_change_shell de User cast-proof

parent ba31a94c
......@@ -839,7 +839,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
:returns: a message and a boolean which is True if the user has
the right to change a shell
if not ((self == user_request and OptionalUser.get_cached_value('self_change_shell'))
if not (( == and OptionalUser.get_cached_value('self_change_shell'))
or user_request.has_perm('users.change_user_shell')):
return False, u"Droit requis pour changer le shell"
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