mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-23 10:49:31 +00:00
add tests
This commit is contained in:
1 parent
3312a6214e
commit
2c77ed3c54
2 files changed
+58
-10
No files matched your search
+1
-1
@@ -238,7 +238,7 @@ class Club(models.Model):
|
||||
|
||||
def can_be_edited_by(self, user: User) -> bool:
|
||||
"""Method to see if that object can be edited by the given user."""
|
||||
return self.has_rights_in_club(user)
|
||||
return user.has_perm("club.change_club") or self.has_rights_in_club(user)
|
||||
|
||||
def can_roles_be_edited_by(self, user: User) -> bool:
|
||||
"""Return True if the given user can edit the roles of this club"""
|
||||
|
||||
Reference in new issue
Block a user