# @param cred credential string specifying rights of the caller
#
# @return list of record dictionaries
- def list(self, cred):
+ def list(self, cred, auth_hrn):
self.decode_authentication(cred, "list")
- auth_name = self.object_gid.get_hrn()
- table = self.get_auth_table(auth_name)
+ if not self.hierarchy.auth_exists(auth_hrn):
+ raise MissingAuthority(auth_hrn)
+
+ table = self.get_auth_table(auth_hrn)
records = table.list()
#
# @return list of record objects
- def list(self, cred):
- result_dict_list = self.server.list(cred.save_to_string(save_parents=True))
+ def list(self, cred, auth_hrn):
+ result_dict_list = self.server.list(cred.save_to_string(save_parents=True), auth_hrn)
result_rec_list = []
for dict in result_dict_list:
result_rec_list.append(GeniRecord(dict=dict))