diff options
| author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-09-23 10:45:21 -0400 |
|---|---|---|
| committer | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-09-23 10:45:21 -0400 |
| commit | c29c68f0fa27fa81f22ca42958bbd564f719f3ae (patch) | |
| tree | a1daa7457560bab52b94b126cfe8a9e88607065d /nova/api | |
| parent | be2887915623e4f071e8de9f4bd9acc299e3f078 (diff) | |
| parent | f3f271644eac4ec74ce3786840a7743aac4f6032 (diff) | |
| download | nova-c29c68f0fa27fa81f22ca42958bbd564f719f3ae.tar.gz nova-c29c68f0fa27fa81f22ca42958bbd564f719f3ae.tar.xz nova-c29c68f0fa27fa81f22ca42958bbd564f719f3ae.zip | |
Merge lp:~gundlach/nova/rbac_tests_rewrite
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index a7b10e428..b041787c2 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -25,6 +25,7 @@ import webob.dec import webob.exc from nova import exception +from nova import flags from nova import wsgi from nova.api.ec2 import apirequest from nova.api.ec2 import context @@ -33,6 +34,7 @@ from nova.api.ec2 import cloud from nova.auth import manager +FLAGS = flags.FLAGS _log = logging.getLogger("api") _log.setLevel(logging.DEBUG) @@ -176,6 +178,7 @@ class Authorizer(wsgi.Middleware): controller_name = req.environ['ec2.controller'].__class__.__name__ action = req.environ['ec2.action'] allowed_roles = self.action_roles[controller_name].get(action, []) + allowed_roles.extend(FLAGS.superuser_roles) if self._matches_any_role(context, allowed_roles): return self.application else: |
