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"]
}
}
In the sysadm/users "action"="usershow" output, put a "canremove"="false" within the object of the currently-active user (so the client knows which user(s) cannot be removed right now). We might be able to extend this later on the server side to set that flag for *all* active users on the system instead.
Modify a couple sysadm/users API calls:
"action"="usermod":
Add in the optional PersonaCrypt arguments:
1) "personacrypt_init"="<device>" AND "personacrypt_password"="<password for device>"
This will initialize a personacrypt device and move the current home directory contents onto the device.
2) "personacrypt_import"="<base64-encoded contents of a PC key file>"
This will import an existing key for the designated user and allow a previously initialized device to be used for this user.
3) "personacrypt_disable"="<device password>"
This will disable the personacrypt key for this user, and merge any data from the device back onto the local system (if <device password> is valid/non-empty)
Add new "usermod" action to the sysadm/users class. This is nearly identical to the "useradd" action, but performs changes to an existing user only (limited access users may modify their own settings, but not other users settings).
Additional OPTIONAL input: "newname" change the username to this instead.
REST Request (example):
-------------------------------
PUT /sysadm/users
{
"action" : "usermod",
"comment" : "somecomment",
"name" : "test2"
}
WebSocket Request:
-------------------------------
{
"name" : "users",
"namespace" : "sysadm",
"args" : {
"name" : "test2",
"comment" : "somecomment",
"action" : "usermod"
},
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"result": "success"
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}