mirror of
https://github.com/haiwen/ccnet-server.git
synced 2025-09-01 12:56:27 +00:00
Merge pull request #22 from haiwen/list_child_groups_users
Support listing child groups and members.
This commit is contained in:
@@ -264,6 +264,10 @@ ccnet_start_rpc(CcnetSession *session)
|
||||
ccnet_rpc_get_group_members,
|
||||
"get_group_members",
|
||||
searpc_signature_objlist__int());
|
||||
searpc_server_register_function ("ccnet-threaded-rpcserver",
|
||||
ccnet_rpc_get_members_with_prefix,
|
||||
"get_members_with_prefix",
|
||||
searpc_signature_objlist__int_string());
|
||||
searpc_server_register_function ("ccnet-threaded-rpcserver",
|
||||
ccnet_rpc_check_group_staff,
|
||||
"check_group_staff",
|
||||
@@ -292,6 +296,10 @@ ccnet_start_rpc(CcnetSession *session)
|
||||
ccnet_rpc_get_child_groups,
|
||||
"get_child_groups",
|
||||
searpc_signature_objlist__int());
|
||||
searpc_server_register_function ("ccnet-threaded-rpcserver",
|
||||
ccnet_rpc_get_descendants_groups,
|
||||
"get_descendants_groups",
|
||||
searpc_signature_objlist__int());
|
||||
|
||||
searpc_server_register_function ("ccnet-threaded-rpcserver",
|
||||
ccnet_rpc_create_org,
|
||||
@@ -847,6 +855,18 @@ ccnet_rpc_get_child_groups (int group_id, GError **error)
|
||||
return groups;
|
||||
}
|
||||
|
||||
GList*
|
||||
ccnet_rpc_get_descendants_groups(int group_id, GError **error)
|
||||
{
|
||||
CcnetGroupManager *group_mgr =
|
||||
((CcnetServerSession *)session)->group_mgr;
|
||||
GList *groups = NULL;
|
||||
|
||||
groups = ccnet_group_manager_get_descendants_groups (group_mgr, group_id, error);
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
GList*
|
||||
ccnet_rpc_search_ldapusers (const char *keyword,
|
||||
int start, int limit,
|
||||
@@ -1218,6 +1238,18 @@ ccnet_rpc_get_group_members (int group_id, GError **error)
|
||||
return g_list_reverse (ret);
|
||||
}
|
||||
|
||||
GList *
|
||||
ccnet_rpc_get_members_with_prefix(int group_id, const char *prefix, GError **error)
|
||||
{
|
||||
CcnetGroupManager *group_mgr =
|
||||
((CcnetServerSession *)session)->group_mgr;
|
||||
GList *ret = NULL;
|
||||
|
||||
ret = ccnet_group_manager_get_members_with_prefix (group_mgr, group_id, prefix, error);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
ccnet_rpc_check_group_staff (int group_id, const char *user_name,
|
||||
GError **error)
|
||||
|
Reference in New Issue
Block a user