1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-02 07:54:27 +00:00

Return whether user is in descendants groups by default in is_group_user().

This commit is contained in:
cuihaikuo
2018-05-12 15:46:36 +08:00
parent 727a0b2329
commit ebd04e524f

View File

@@ -960,9 +960,10 @@ class CcnetAPI(object):
def remove_group_user(self, username): def remove_group_user(self, username):
return ccnet_threaded_rpc.remove_group_user(username) return ccnet_threaded_rpc.remove_group_user(username)
def is_group_user(self, group_id, user, in_structure=False): def is_group_user(self, group_id, user, in_structure=True):
""" """
Return non-zero value if true, 0 if not true Return non-zero value if true, 0 if not true
If @in_structure is true, return whether user is in descendants groups and @group_id it self
""" """
return ccnet_threaded_rpc.is_group_user(group_id, user, 1 if in_structure else 0) return ccnet_threaded_rpc.is_group_user(group_id, user, 1 if in_structure else 0)