From 7ace42a5ec7d9cbd9330a11213468b329eee161b Mon Sep 17 00:00:00 2001 From: Jeremy Langley Date: Thu, 28 Oct 2021 01:49:21 -0700 Subject: [PATCH] IsAdmin permissions changed to IsAdminUser Documentation change to keep up with the code permission changes. --- docs/api-guide/viewsets.md | 2 +- docs/community/3.9-announcement.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md index d4ab5a731..417972507 100644 --- a/docs/api-guide/viewsets.md +++ b/docs/api-guide/viewsets.md @@ -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 diff --git a/docs/community/3.9-announcement.md b/docs/community/3.9-announcement.md index fee6e6909..d673fdd18 100644 --- a/docs/community/3.9-announcement.md +++ b/docs/community/3.9-announcement.md @@ -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