Commit ce4b3290 authored by chapeau's avatar chapeau Committed by root

Fix api permission check

parent 8e37baef
Pipeline #2368 passed with stage
in 3 minutes and 23 seconds
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment