again getting away with caller_cred and passing just the hrn of the initial caller
[sfa.git] / sfa / methods / update.py
index 4076e97..01ef639 100644 (file)
@@ -36,12 +36,12 @@ class update(Method):
 
     returns = Parameter(int, "1 if successful")
     
-    def call(self, cred, record_dict, request_hash=None, caller_cred=None):
-        if caller_cred==None:
-               caller_cred=cred
+    def call(self, cred, record_dict, request_hash=None, origin_hrn=None):
+        if origin_hrn==None:
+               origin_hrn=Credential(string=cred).get_gid_caller().get_hrn()
 
            #log the call
-        self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, Credential(string=caller_cred).get_gid_caller().get_hrn(), None, self.name))
+        self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, origin_hrn, None, self.name))
         # This cred might be an authority cred, not a user, so we cant use it to 
         # authenticate the caller's request_hash. Let just get the caller's gid
         # from the cred and authenticate using that