1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 15:36:37 +00:00

Return a list in seafile_api.get_shared_groups_by_repo().

This commit is contained in:
cuihaikuo
2018-09-10 10:57:45 +08:00
parent e233a9a3de
commit dbff878d63

View File

@@ -463,10 +463,17 @@ class SeafileAPI(object):
return seafserv_threaded_rpc.group_unshare_repo(repo_id, group_id, username) return seafserv_threaded_rpc.group_unshare_repo(repo_id, group_id, username)
def get_shared_group_ids_by_repo(self, repo_id): def get_shared_group_ids_by_repo(self, repo_id):
""" group_ids = seafserv_threaded_rpc.get_shared_groups_by_repo(repo_id)
Return: a string containing list of group ids. Each id is seperated by '\n'
""" if not group_ids:
return seafserv_threaded_rpc.get_shared_groups_by_repo(repo_id) return []
ret = []
for group_id in group_ids.split('\n'):
if not group_id:
continue
ret.append(group_id)
return ret
def list_repo_shared_group(self, from_user, repo_id): def list_repo_shared_group(self, from_user, repo_id):
# deprecated, use list_repo_shared_group_by_user instead. # deprecated, use list_repo_shared_group_by_user instead.