@@ -110,6 +110,15 @@ To implement a custom permission, override `BasePermission` and implement the `.
...
@@ -110,6 +110,15 @@ To implement a custom permission, override `BasePermission` and implement the `.
The method should return `True` if the request should be granted access, and `False` otherwise.
The method should return `True` if the request should be granted access, and `False` otherwise.
## Example
The following is an example of a permission class that checks the incoming request's IP address against a blacklist, and denies the request if the IP has been blacklisted.
class BlacklistPermission(permissions.BasePermission):