mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
Fix api permission check
This commit is contained in:
parent
8e37baef7b
commit
ce4b3290dc
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,7 @@
|
|||
"""
|
||||
|
||||
from rest_framework import permissions, exceptions
|
||||
|
||||
from django.http import Http404
|
||||
from . import acl
|
||||
|
||||
|
||||
|
@ -273,6 +273,8 @@ class AutodetectACLPermission(permissions.BasePermission):
|
|||
# they have read permissions to see 403, or not, and simply see
|
||||
# a 404 response.
|
||||
|
||||
SAFE_METHODS = ("GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE")
|
||||
|
||||
if request.method in SAFE_METHODS:
|
||||
# Read permissions already checked and failed, no need
|
||||
# to make another lookup.
|
||||
|
|
Loading…
Reference in a new issue