Issue #1167 : Add pwg.groups.duplicate to API methods, add the merge action in group manager (and small code fixes)

This commit is contained in:
Zacharie
2020-05-15 12:37:01 +02:00
committed by plegall
parent c4b38d1a41
commit 9a293dc1c5
5 changed files with 267 additions and 57 deletions
+14 -1
View File
@@ -915,7 +915,7 @@ function ws_addDefaultMethods( $arr )
'ws_groups_merge',
array(
'destination_group_id' => array('type'=>WS_TYPE_ID,
'info'=>'Destination group (is not necessarily part of groups to merge)'),
'info'=>'Is not necessarily part of groups to merge'),
'merge_group_id' => array('flags'=>WS_PARAM_FORCE_ARRAY,
'type'=>WS_TYPE_ID),
'pwg_token' => array(),
@@ -925,6 +925,19 @@ function ws_addDefaultMethods( $arr )
array('admin_only'=>true, 'post_only'=>true)
);
$service->addMethod(
'pwg.groups.duplicate',
'ws_groups_duplicate',
array(
'group_id' => array('type'=>WS_TYPE_ID),
'copy_name' => array(),
'pwg_token' => array(),
),
'Create a copy of a group',
$ws_functions_root . 'pwg.groups.php',
array('admin_only'=>true, 'post_only'=>true)
);
$service->addMethod(
'pwg.users.getList',
'ws_users_getList',