🚨(linter) add missing docstrings

Title says all there is to say…
This commit is contained in:
Laurent Bossavit
2024-10-25 14:59:02 +02:00
committed by Laurent Bossavit
parent 3934a0bc28
commit 1d1f5cfbb6
32 changed files with 38 additions and 4 deletions

View File

@@ -12,13 +12,13 @@ class IsAuthenticated(permissions.BasePermission):
"""
def has_permission(self, request, view):
"""Check auth token first."""
return bool(request.auth) if request.auth else request.user.is_authenticated
class IsSelf(IsAuthenticated):
"""
Allows access only to authenticated users. Alternative method checking the presence
of the auth token to avoid hitting the database.
Allows access only to user's own data.
"""
def has_object_permission(self, request, view, obj):