From: Anil-Kumar Vengalil Date: Wed, 10 Feb 2010 16:45:08 +0000 (+0000) Subject: do not allow a user to extract the credential, if his account on PlanetLab is disabled X-Git-Tag: sfa-0.9-11~117 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=caeefc1a8a5ce718edc9efb2aca9bb54f23c5593 do not allow a user to extract the credential, if his account on PlanetLab is disabled --- diff --git a/sfa/managers/registry_manager_pl.py b/sfa/managers/registry_manager_pl.py index 619e4815..1e43bf09 100644 --- a/sfa/managers/registry_manager_pl.py +++ b/sfa/managers/registry_manager_pl.py @@ -32,6 +32,8 @@ def get_credential(api, xrn, type, is_self=False): # verify_cancreate_credential requires that the member lists # (researchers, pis, etc) be filled in api.fill_record_info(record) + if not record['enabled']: + raise AccountNotEnabled(": PlanetLab account %s is not enabled. Please contact your site PI" %(record['email'])) # get the callers gid # if this is a self cred the record's gid is the caller's gid