From 6163fe11986897e2f712be1cd4a4074eeb48cfef Mon Sep 17 00:00:00 2001 From: kairat_kushaev Date: Mon, 4 Apr 2016 10:53:09 +0300 Subject: [PATCH] Use roles attribute from oslo context Starting from version 2.2.0 oslo context has out-of-the-box 'roles' attribute that can store user roles. So Glance doesn't need to implement custom attribute for roles in Request Context anymore. Change-Id: I39804ebc5f91ce6ad5bfb9c52b324d4cc8a8b115 --- glance/context.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/glance/context.py b/glance/context.py index 2491f393..88a445be 100644 --- a/glance/context.py +++ b/glance/context.py @@ -26,11 +26,9 @@ class RequestContext(context.RequestContext): """ - def __init__(self, roles=None, - owner_is_tenant=True, service_catalog=None, + def __init__(self, owner_is_tenant=True, service_catalog=None, policy_enforcer=None, **kwargs): super(RequestContext, self).__init__(**kwargs) - self.roles = roles or [] self.owner_is_tenant = owner_is_tenant self.service_catalog = service_catalog self.policy_enforcer = policy_enforcer or policy.Enforcer()