diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-02-18 22:49:13 -0800 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-02-18 22:49:13 -0800 |
| commit | e518ab4d16ec6166c0ea391af4c94aaf4d8aa2db (patch) | |
| tree | 38e5830b50112d9b0e905af7007e94764e1b56f2 /nova/volume | |
| parent | 8de8d1d045ca9fe12596e53d2244f4f8703cc209 (diff) | |
replace context.user.is_admin() with context.is_admin because it is much faster
Diffstat (limited to 'nova/volume')
| -rw-r--r-- | nova/volume/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/volume/api.py b/nova/volume/api.py index 478c83486..5201c7d90 100644 --- a/nova/volume/api.py +++ b/nova/volume/api.py @@ -85,7 +85,7 @@ class API(base.Base): return self.db.volume_get(context, volume_id) def get_all(self, context): - if context.user.is_admin(): + if context.is_admin: return self.db.volume_get_all(context) return self.db.volume_get_all_by_project(context, context.project_id) |
