mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-22 23:13:46 +00:00
Rend can_change_shell de User cast-proof
This commit is contained in:
parent
ba31a94c20
commit
1e47fa16a0
1 changed files with 1 additions and 1 deletions
|
@ -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 ((self.pk == user_request.pk 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"
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue