Commit bd57e39e authored by LEVY-FALK Hugo's avatar LEVY-FALK Hugo Committed by root

Des @staticmethod pour @Chibrac.

parent 20be7fdb
......@@ -149,12 +149,12 @@ class Facture(FieldPermissionModelMixin, models.Model):
else:
return True, None
@classmethod
def can_change_control(cls, user_request, *args, **kwargs):
@staticmethod
def can_change_control(user_request, *args, **kwargs):
return user_request.has_perms(('tresorier',)), "Vous ne pouvez pas éditer le controle sans droit trésorier"
@classmethod
def can_change_pdf(cls, user_request, *args, **kwargs):
@staticmethod
def can_change_pdf(user_request, *args, **kwargs):
return user_request.has_perms(('tresorier',)), "Vous ne pouvez pas éditer une facture sans droit trésorier"
field_permissions = {
......
......@@ -820,16 +820,16 @@ class User(FieldPermissionModelMixin, AbstractBaseUser):
else:
return False, u"Vous ne pouvez éditer un autre utilisateur que vous même"
@classmethod
def can_change_state(cls, user_request, *args, **kwargs):
@staticmethod
def can_change_state(user_request, *args, **kwargs):
return user_request.has_perms(('bureau',)), "Droit bureau requis pour changer l'état"
@classmethod
def can_change_shell(cls, user_request, *args, **kwargs):
@staticmethod
def can_change_shell(user_request, *args, **kwargs):
return user_request.has_perms(('cableur',)), "Droit requis pour changer le shell"
@classmethod
def can_change_force(cls, user_request, *args, **kwargs):
@staticmethod
def can_change_force(user_request, *args, **kwargs):
return user_request.has_perms(('cableur',)), "Droit requis pour forcer le déménagement"
def can_delete(self, user_request, *args, **kwargs):
......
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