1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Wrap get_group rpc

This commit is contained in:
xiez
2012-08-01 22:45:58 +08:00
parent 4db42157e9
commit edbc6de917
5 changed files with 21 additions and 18 deletions

View File

@@ -106,14 +106,13 @@ def get_emailusers(start, limit):
# return groups
# def get_group(group_id):
# group = ccnet_threaded_rpc.get_group(group_id)
# if not group:
# return None
# group.members = group.props.members.split(" ")
# group.followers = group.props.followers.split(" ")
# group.maintainers = group.props.maintainers.split(" ")
# return group
def get_group(group_id):
group_id_int = int(group_id)
try:
group = ccnet_threaded_rpc.get_group(group_id_int)
except SearpcError:
group = None
return group
def check_group_staff(group_id_int, user_or_username):
"""Check where user is group staff"""