diff options
author | Rohan Kanade <rohan.kanade@izeltech.com> | 2014-02-26 13:35:49 +0100 |
---|---|---|
committer | Rohan Kanade <rohan.kanade@izeltech.com> | 2014-02-28 07:24:32 +0100 |
commit | 07af3e4e60f8d58b37ed70e448e0ec90749a8561 (patch) | |
tree | 81f4ca191d318fdf499b218ace98afc265f2b830 /nova/policy.py | |
parent | 8311578248b9877541933a6e7dca1f3498cbaaa2 (diff) | |
download | nova-07af3e4e60f8d58b37ed70e448e0ec90749a8561.tar.gz |
Adds unit test for etc/nova/policy.json data
* Test live etc/nova/policy.json data
* Convert all actions in policy.json to admin-only actions
* Check that Policy auth exception is raised when all above actions are
called using non-admin context
Change-Id: I1b97987f8e9e3bacc606385a56daad189cf6ce19
Closes-Bug: #1262325
Diffstat (limited to 'nova/policy.py')
-rw-r--r-- | nova/policy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/policy.py b/nova/policy.py index 8a522fcaef..a19370958c 100644 --- a/nova/policy.py +++ b/nova/policy.py @@ -129,3 +129,7 @@ class IsAdminCheck(policy.Check): """Determine whether is_admin matches the requested value.""" return creds['is_admin'] == self.expected + + +def get_rules(): + return policy._rules |