From 79faa28f0389f427956ca72b3a902864ae5856f5 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 8 Feb 2012 23:37:31 +0000 Subject: Fixes role checking for admin check Change-Id: I6afe52033996b56aa38033017e0ce2f37c471592 --- keystone/policy/backends/simple.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'keystone/policy') diff --git a/keystone/policy/backends/simple.py b/keystone/policy/backends/simple.py index 206ab574..ec4840fe 100644 --- a/keystone/policy/backends/simple.py +++ b/keystone/policy/backends/simple.py @@ -17,5 +17,7 @@ class SimpleMatch(object): for requirement in target: key, match = requirement.split(':', 1) check = credentials.get(key) - if check == match: + if check is None or isinstance(check, basestring): + check = [check] + if match in check: return True -- cgit