diff options
| author | Tom Christie | 2012-10-17 15:41:57 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-10-17 15:41:57 +0100 |
| commit | cab4a2a5ad17545ac435785bf55b0b3a6c8f932c (patch) | |
| tree | 9f7ede0e3a81e65ba952b068b00d49b6764e0adc /docs/api-guide/permissions.md | |
| parent | b5daa40852fb5936e6cddb31ecda5c4b40175cd4 (diff) | |
| download | django-rest-framework-cab4a2a5ad17545ac435785bf55b0b3a6c8f932c.tar.bz2 | |
Split up doc sections more cleanly
Diffstat (limited to 'docs/api-guide/permissions.md')
| -rw-r--r-- | docs/api-guide/permissions.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index eb290849..b25b52be 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -54,6 +54,8 @@ Or, if you're using the `@api_view` decorator with function based views. } return Response(content) +--- + # API Reference ## IsAuthenticated @@ -88,12 +90,15 @@ To use custom model permissions, override `DjangoModelPermissions` and set the ` The `DjangoModelPermissions` class also supports object-level permissions. Third-party authorization backends such as [django-guardian][guardian] that provide object-level permissions should work just fine with `DjangoModelPermissions` without any custom configuration required. +--- + # Custom permissions To implement a custom permission, override `BasePermission` and implement the `.has_permission(self, request, view, obj=None)` method. The method should return `True` if the request should be granted access, and `False` otherwise. + [cite]: https://developer.apple.com/library/mac/#documentation/security/Conceptual/AuthenticationAndAuthorizationGuide/Authorization/Authorization.html [authentication]: authentication.md [throttling]: throttling.md |
