Doc for the permission IsModelInstanceOwnerOrIsAnonReadOnly

This commit is contained in:
Camille Harang 2012-02-02 03:25:33 +01:00
parent 6bd2205833
commit ada676123e

View File

@ -80,6 +80,9 @@ class IsAdminUser(BasePermission):
class IsModelInstanceOwnerOrIsAnonReadOnly(BasePermission): class IsModelInstanceOwnerOrIsAnonReadOnly(BasePermission):
""" """
The request is authenticated as the owner of the model instance, or is a read-only request. The request is authenticated as the owner of the model instance, or is a read-only request.
In order to determine the owner the model has to provide a .get_owner() function,
otherwise the permission will be denied.
""" """
def check_permission(self, user): def check_permission(self, user):