cosmetic again
[sfa.git] / sfa / trust / auth.py
index 0a2b3ce..5ff6ba6 100644 (file)
@@ -39,7 +39,7 @@ class Auth:
     # do not use mutable as default argument 
     # http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
     def checkCredentials(self, creds, operation, xrns=None, 
-                         check_sliver_callback=None, speaking_for_hrn=None):
+                         check_sliver_callback=None, options=None):
         if xrns is None: xrns=[]
         def log_invalid_cred(cred):
             cred_obj=Credential(string=cred)
@@ -74,9 +74,6 @@ class Auth:
 
         # if speaks for gid matches caller cert then we've found a valid
         # speaks for credential
-        ### Thierry : we have no options to pass determine_speaks_for in this context
-        # so only as a workaround here:
-        options={}
         speaks_for_gid = determine_speaks_for(logger, creds, self.peer_cert, \
                                               options, self.trusted_cert_list)
 
@@ -103,9 +100,6 @@ class Auth:
         if not len(valid):
             raise Forbidden("Invalid credential %s -- %s"%(error[0],error[1]))
         
-        if speaking_for_hrn and not speaks_for_cred:
-            raise InsufficientRights('Access denied: "geni_speaking_for" option specified but no valid speaks for credential found: %s -- %s' % (error[0],error[1]))
-        
         return valid