diff options
| author | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-08-09 17:03:24 -0700 |
|---|---|---|
| committer | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-08-09 17:03:24 -0700 |
| commit | f73b6dc8e90b763da1fe86496fc6fd6a80b99f0a (patch) | |
| tree | e15b02ed430ded7d984c61f8067b85013a4d8e58 | |
| parent | f3530742645d0a71593d1aa923f5e383e31a64e0 (diff) | |
List security groups project wise for admin users same as other users
| -rw-r--r-- | nova/api/openstack/contrib/security_groups.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/nova/api/openstack/contrib/security_groups.py b/nova/api/openstack/contrib/security_groups.py index d3a8e21b8..1d70956dc 100644 --- a/nova/api/openstack/contrib/security_groups.py +++ b/nova/api/openstack/contrib/security_groups.py @@ -110,12 +110,8 @@ class SecurityGroupController(object): context = req.environ['nova.context'] self.compute_api.ensure_default_security_group(context) - if context.is_admin: - groups = db.security_group_get_all(context) - else: - groups = db.security_group_get_by_project(context, - context.project_id) - + groups = db.security_group_get_by_project(context, + context.project_id) limited_list = common.limited(groups, req) result = [self._format_security_group(context, group) for group in limited_list] |
