Authenticate correctly users that connect with an authorization token

This commit is contained in:
Yohann D'ANELLO 2020-09-10 09:31:27 +02:00
parent 6a0dc4cb10
commit 72cc1638e6
2 changed files with 15 additions and 1 deletions

View file

@ -16,7 +16,7 @@ class StrongDjangoObjectPermissions(DjangoObjectPermissions):
# The queryset is filtered, and permissions are more powerful than a simple check than just "can view this model"
perms_map = {
'GET': [], # ['%(app_label)s.view_%(model_name)s'],
'GET': ['%(app_label)s.view_%(model_name)s'],
'OPTIONS': [],
'HEAD': [],
'POST': ['%(app_label)s.add_%(model_name)s'],