From: Tony Mack Date: Thu, 2 Jun 2011 18:26:49 +0000 (-0400) Subject: support the authority+cm type X-Git-Tag: sfa-1.0-22~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6d6e77bc9b4d44f6b1e773a337a786a5bda96cb5;p=sfa.git support the authority+cm type --- 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":