From 5f370b5f74c96ec3906d52b5828a79364ddf3702 Mon Sep 17 00:00:00 2001 From: Amrith Kumar Date: Tue, 26 May 2015 22:02:18 -0400 Subject: [PATCH] Error message missing tenant id The code just doesn't render the string correctly, adding the tenant id. Also, since this is a message that causes us to throw an exception, I've changed it from LOG.debug to LOG.error. Change-Id: Iafd5ba3cf12df9c60c491d39677231eee8be0a42 Closes-Bug: #1459067 --- trove/common/auth.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trove/common/auth.py b/trove/common/auth.py index 5ec4c2ee7b..c8dd7d2e37 100644 --- a/trove/common/auth.py +++ b/trove/common/auth.py @@ -66,8 +66,11 @@ class TenantBasedAuth(object): "%(request)s") % {'tenant_id': tenant_id, 'request': request})) return True - msg = _("User with tenant id %s cannot access this resource") - LOG.debug(msg % tenant_id) + + msg = _( + "User with tenant id %s cannot access this resource.") % tenant_id + + LOG.error(msg) raise webob.exc.HTTPForbidden(msg)