mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
API CHANGE:
Add a new action to the sysadm/users class: "groupmod"
This action allows for modifying a given group on the system
REQUIRED: "name"="<name of group to modify>"
and any one of these options is also required:
"users":["array of users"] (will set the list of users for this group)
"add_users":["array of users"] (will add the listed users to the current users)
"remove_users":["array of users"] (will remove the listed users from the current users)
Example API Request (JSON)
{
"id":"sample",
"namespace":"sysadm",
"name":"users",
"args":{
"action":"groupmod",
"name":"operator",
"users":["user1","user2"]
}
}
This commit is contained in:
@@ -962,6 +962,9 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmUserRequest(bool allaccess,
|
||||
if(ok){ out->insert("result","success"); }
|
||||
else{ out->insert("error","Could not delete group"); }
|
||||
|
||||
}else if(action=="groupmod" && allaccess){
|
||||
ok = sysadm::UserManager::modifyGroup(out, in_args.toObject() );
|
||||
|
||||
}else if(action=="personacrypt_init"){
|
||||
qDebug() << "got PC init request:" << in_args << allaccess << user;
|
||||
bool go = true;
|
||||
|
||||
Reference in New Issue
Block a user