Skip to content

Commit b99ac01

Browse files
Back2Basicssigvef
authored andcommitted
IsAdmin permissions changed to IsAdminUser (encode#8227)
Documentation change to keep up with the code permission changes. Co-authored-by: Jeremy Langley <[email protected]>
1 parent b0d9e68 commit b99ac01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/api-guide/viewsets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ You may inspect these attributes to adjust behaviour based on the current action
125125
if self.action == 'list':
126126
permission_classes = [IsAuthenticated]
127127
else:
128-
permission_classes = [IsAdmin]
128+
permission_classes = [IsAdminUser]
129129
return [permission() for permission in permission_classes]
130130

131131
## Marking extra actions for routing

docs/community/3.9-announcement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ You can now compose permission classes using the and/or operators, `&` and `|`.
110110
For example...
111111

112112
```python
113-
permission_classes = [IsAuthenticated & (ReadOnly | IsAdmin)]
113+
permission_classes = [IsAuthenticated & (ReadOnly | IsAdminUser)]
114114
```
115115

116116
If you're using custom permission classes then make sure that you are subclassing

0 commit comments

Comments
 (0)