1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-09-01 12:56:27 +00:00

Add list all departments api.

This commit is contained in:
ly1217
2019-05-08 19:28:29 -07:00
parent 0289c20b08
commit 81d9ecfa12
5 changed files with 62 additions and 0 deletions

View File

@@ -252,6 +252,10 @@ ccnet_start_rpc(CcnetSession *session)
ccnet_rpc_get_groups,
"get_groups",
searpc_signature_objlist__string_int());
searpc_server_register_function ("ccnet-threaded-rpcserver",
ccnet_rpc_list_all_departments,
"list_all_departments",
searpc_signature_objlist__void());
searpc_server_register_function ("ccnet-threaded-rpcserver",
ccnet_rpc_get_all_groups,
"get_all_groups",
@@ -1200,6 +1204,18 @@ ccnet_rpc_get_groups (const char *username, int return_ancestors, GError **error
return ret;
}
GList *
ccnet_rpc_list_all_departments (GError **error)
{
CcnetGroupManager *group_mgr =
((CcnetServerSession *)session)->group_mgr;
GList *ret = NULL;
ret = ccnet_group_manager_list_all_departments (group_mgr, error);
return ret;
}
GList *
ccnet_rpc_get_all_groups (int start, int limit,
const char *source, GError **error)