Commit 16b1480e authored by Lukas Burgey's avatar Lukas Burgey

Reduce the auth debugging

parent 2d5debdb
......@@ -11,7 +11,7 @@ from django.contrib.sessions.models import Session
from .... import models
LOGGER = logging.getLogger(__name__)
CLIENT_DEBUGGING = False
AUTH_DEBUGGING = False
ALLOW = HttpResponse('allow')
DENY = HttpResponse('deny')
......@@ -144,6 +144,9 @@ def resource_auth_decision(request, decision):
permission = request.POST.get('permission', [])
resource = request.POST.get('resource', '')
name = request.POST.get('name', '')
if not AUTH_DEBUGGING:
return decision
if decision == ALLOW:
LOGGER.debug(
"[resource] ALLOW %s %s '%s' for %s",
......@@ -185,6 +188,9 @@ def topic_auth_decision(request, decision):
name = request.POST.get('name', '')
routing_key = request.POST.get('routing_key', '')
if not AUTH_DEBUGGING:
return decision
if decision == ALLOW:
LOGGER.debug(
"[topic] ALLOW %s %s %s '%s' for %s",
......
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