Enhance check_user_can_edit method with detailed docstring for clarity

This commit is contained in:
Ross
2025-08-18 09:40:49 +01:00
parent e71aa4c802
commit d61ecaac66
+9 -1
View File
@@ -549,7 +549,15 @@ class Case(models.Model, AuthorMixin, QuestionMixin):
return size
def check_user_can_edit(self, user):
def check_user_can_edit(self, user) -> bool:
"""Check if the user can edit the case.
Args:
user (User): The user to check.
Returns:
bool: True if the user can edit the case, False otherwise.
"""
if user.is_superuser:
return True