From f5dba169d8ec6a47c2fcf7f22b7a5a4d61f0de5b Mon Sep 17 00:00:00 2001 From: sauravfouzdar Date: Fri, 10 Feb 2023 17:10:38 +0530 Subject: [PATCH] Allow superuser/staff to delete outstanding user token * As of now superuser or staff user can not delete outstanding user token --- rest_framework_simplejwt/token_blacklist/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework_simplejwt/token_blacklist/admin.py b/rest_framework_simplejwt/token_blacklist/admin.py index b346ef5d9..55aaa30c8 100644 --- a/rest_framework_simplejwt/token_blacklist/admin.py +++ b/rest_framework_simplejwt/token_blacklist/admin.py @@ -32,7 +32,7 @@ def has_add_permission(self, *args, **kwargs): return False def has_delete_permission(self, *args, **kwargs): - return False + return True def has_change_permission(self, request, obj=None): return request.method in ["GET", "HEAD"] and super().has_change_permission(