From: Tony Mack Date: Sun, 27 Sep 2009 00:02:31 +0000 (+0000) Subject: fix bug in verify object belongs to me X-Git-Tag: sfa-0.9-3~28 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6b6ca27479c18d96565a7a7c28a26c81b334b023;p=sfa.git fix bug in verify object belongs to me --- diff --git a/sfa/trust/auth.py b/sfa/trust/auth.py index f0574d93..2f807a7d 100644 --- a/sfa/trust/auth.py +++ b/sfa/trust/auth.py @@ -96,6 +96,7 @@ class Auth: @param auth_name human readable name of authority """ + # get auth info will throw an exception if the authority doesnt exist self.get_auth_info(name) @@ -108,9 +109,9 @@ class Auth: @param name human readable name of object """ auth_name = self.get_authority(name) - if not auth_name or name == self.config.SFA_INTERFACE_HRN: - # the root authority belongs to the registry by default? - # TODO: is this true? + if not auth_name: + auth_name = name + if name == self.config.SFA_INTERFACE_HRN: return self.verify_auth_belongs_to_me(auth_name)