From 7bcb886a3b0339e2e6c3a88e6ba45fd91a2c8df2 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 7 May 2012 15:54:18 +0200 Subject: [PATCH] remove useless verify_cancreate_credential --- sfa/trust/auth.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/sfa/trust/auth.py b/sfa/trust/auth.py index f6269b31..c2b4980e 100644 --- a/sfa/trust/auth.py +++ b/sfa/trust/auth.py @@ -281,30 +281,6 @@ class Auth: return rl - def verify_cancreate_credential(self, src_cred, record): - """ - Verify that a user can retrive a particular type of credential. - For slices, the user must be on the researcher list. For SA and - MA the user must be on the pi and operator lists respectively - """ - - type = record.get_type() - cred_object_hrn = src_cred.get_gid_object().get_hrn() - if cred_object_hrn in [self.config.SFA_REGISTRY_ROOT_AUTH]: - return - if type=="slice": - researchers = record.get("researcher", []) - if not (cred_object_hrn in researchers): - raise PermissionError(cred_object_hrn + " is not in researcher list for " + record.get_name()) - elif type == "sa": - pis = record.get("pi", []) - if not (cred_object_hrn in pis): - raise PermissionError(cred_object_hrn + " is not in pi list for " + record.get_name()) - elif type == "ma": - operators = record.get("operator", []) - if not (cred_object_hrn in operators): - raise PermissionError(cred_object_hrn + " is not in operator list for " + record.get_name()) - def get_authority(self, hrn): return get_authority(hrn) -- 2.47.0