svn keywords
[plcapi.git] / PLC / Methods / UpdateIlink.py
index a0578ba..9e86831 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 #
 # Thierry Parmentelat - INRIA
 #
@@ -18,7 +20,7 @@ class UpdateIlink(Method):
     """
     Updates the value of an existing ilink
 
-    Access rights depend on the ilink type.
+    Access rights depend on the tag type.
 
     Returns 1 if successful, faults otherwise.
     """
@@ -41,20 +43,8 @@ class UpdateIlink(Method):
             raise PLCInvalidArgument, "No such ilink %r"%ilink_id
         ilink = ilinks[0]
 
-       if 'admin' not in self.caller['roles']:
-#      # check permission : it not admin, is the user affiliated with the right site
-#          # locate node
-#          node = Nodes (self.api,[node['node_id']])[0]
-#          # locate site
-#          site = Sites (self.api, [node['site_id']])[0]
-#          # check caller is affiliated with this site
-#          if self.caller['person_id'] not in site['person_ids']:
-#              raise PLCPermissionDenied, "Not a member of the hosting site %s"%site['abbreviated_site']
-           
-           required_min_role = ilink_type ['min_role_id']
-           if required_min_role is not None and \
-                   min(self.caller['role_ids']) > required_min_role:
-               raise PLCPermissionDenied, "Not allowed to modify the specified ilink, requires role %d",required_min_role
+        # xxx see AddIlink for this - should be written once in the Ilink class I guess
+        # checks rights and stuff
 
         ilink['value'] = value
         ilink.sync()