returns = Parameter(int, "1 if successful")
def call(self, cred, record_dict):
- self.api.auth.decode_authentication(cred, "update")
+ self.api.auth.check(cred, "update")
record = GeniRecord(dict = record_dict)
type = record.get_type()
self.api.auth.verify_object_permission(record.get_name())
# update the PLC information that was specified with the record
- if (type == "sa") or (type == "ma"):
+ if (type == "authority"):
self.api.plshell.UpdateSite(self.api.plauth, pointer, record.get_pl_info())
elif type == "slice":
update_fields[key] = all_fields[key]
self.api.plshell.UpdatePerson(self.api.plauth, pointer, update_fields)
- elif type == "node":
+ elif type == "node":
self.api.plshell.UpdateNode(self.api.plauth, pointer, record.get_pl_info())
else:
raise UnknownGeniType(type)
- # update membership for researchers, pis, owners, operators^M
+ # update membership for researchers, pis, owners, operators
self.api.update_membership(existing_record, record)
- return 1
+ return 1