From 6d6e77bc9b4d44f6b1e773a337a786a5bda96cb5 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 2 Jun 2011 14:26:49 -0400 Subject: [PATCH] support the authority+cm type --- sfa/trust/rights.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sfa/trust/rights.py b/sfa/trust/rights.py index 4cc33864..ff1ac2d6 100644 --- a/sfa/trust/rights.py +++ b/sfa/trust/rights.py @@ -60,7 +60,7 @@ def determine_rights(type, name): elif type in ["sa", "authority+sa"]: rl.add("authority") rl.add("sa") - elif type in ["ma", "authority+ma"]: + elif type in ["ma", "authority+ma", "cm", "authority+cm"]: rl.add("authority") rl.add("ma") elif type == "authority": @@ -200,6 +200,7 @@ class Rights: # @param op_name is an operation to check, for example "listslices" def can_perform(self, op_name): + for right in self.rights: if right.can_perform(op_name): return True @@ -268,10 +269,10 @@ class Rights: rl.add("refresh") rl.add("resolve") rl.add("info") - elif type == "sa": + elif type in ["sa", "authority+sa"]: rl.add("authority") rl.add("sa") - elif type == "ma": + elif type in ["ma", "authority+ma", "cm", "authority+cm"]: rl.add("authority") rl.add("ma") elif type == "authority": -- 2.43.0