1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

Add group feature

This commit is contained in:
xiez
2012-05-15 10:59:16 +08:00
parent 661439d83a
commit d63b068b2d
19 changed files with 631 additions and 195 deletions

View File

@@ -385,9 +385,31 @@ def get_binding_peerids(email):
except SearpcError:
return []
if not peer_ids:
return []
peerid_list = []
for peer_id in peer_ids.split("\n"):
if peer_id == '':
continue
peerid_list.append(peer_id)
return peerid_list
def get_group_repoids(group_id=None):
"""Get repo ids of a given group id or username"""
try:
repo_ids = seafserv_threaded_rpc.get_group_repoids(group_id)
except SearpcError:
return []
if not repo_ids:
return []
repoid_list = []
for repo_id in repo_ids.split("\n"):
if repo_id == '':
continue
repoid_list.append(repo_id)
return repoid_list