This commit is contained in:
Ross
2025-12-08 09:52:18 +00:00
parent 02a9118faf
commit 0917947a98
8 changed files with 24 additions and 4 deletions
+3
View File
@@ -65,6 +65,9 @@ class AuthorMixin():
def is_author(self, user: User) -> bool:
"""Returns True if the user is an author of the object"""
if user.is_superuser:
return True
return self.author.filter(id=user.id).exists()