mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Merge branch 'fix_api_perm_check' into 'master'
Fix api permission check See merge request federez/re2o!484
This commit is contained in:
commit
706b309a2a
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