IsAdmin permissions changed to IsAdminUser (#8227)

Documentation change to keep up with the code permission changes.

Co-authored-by: Jeremy Langley <jlangley2code@gmail.com>
This commit is contained in:
Jeremy Langley 2021-12-08 06:33:41 -08:00 committed by GitHub
parent dabf2216c3
commit 37b73ef46e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ You may inspect these attributes to adjust behaviour based on the current action
if self.action == 'list':
permission_classes = [IsAuthenticated]
else:
permission_classes = [IsAdmin]
permission_classes = [IsAdminUser]
return [permission() for permission in permission_classes]
## Marking extra actions for routing

View File

@ -110,7 +110,7 @@ You can now compose permission classes using the and/or operators, `&` and `|`.
For example...
```python
permission_classes = [IsAuthenticated & (ReadOnly | IsAdmin)]
permission_classes = [IsAuthenticated & (ReadOnly | IsAdminUser)]
```
If you're using custom permission classes then make sure that you are subclassing