1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-20 17:41:55 +02:00

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'],