Fix EC2 credentials crud after policy backend change

https://review.openstack.org/4659 implemented the common policy code
but made a change to the exception thrown by wsgi.Application.assert_admin()
and Ec2Controller._is_admin() needed updating.

Fixes bug 950557

Change-Id: I0e27aeeabd1be5a6012e34aa71efdfc2f2d5a726
This commit is contained in:
Dean Troyer
2012-03-09 00:03:46 -06:00
parent 0a124fa6a1
commit 303a10b946
+1 -1
View File
@@ -285,7 +285,7 @@ class Ec2Controller(wsgi.Application):
try:
self.assert_admin(context)
return True
except AssertionError:
except exception.Forbidden:
return False
def _assert_owner(self, context, user_id, credential_id):