mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
API CHANGE
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.
This commit is contained in:
@@ -36,6 +36,7 @@ bool UserManager::listUsers(QJsonObject *out, bool showall, QString user){
|
||||
uinfo.insert("home_dir", info[8]);
|
||||
uinfo.insert("shell", info[9]);
|
||||
if(PCinstalled && QFile::exists("/var/db/personacrypt/" + info[0] + ".key") ){ uinfo.insert("personacrypt_enabled","true"); }
|
||||
if(info[0]==user){ uinfo.insert("canremove","false"); } //current user requesting info - cannot remove it
|
||||
out->insert(info[0], uinfo); //use the username as the unique object name
|
||||
}else if(info.length() == 7){
|
||||
QJsonObject uinfo;
|
||||
|
||||
Reference in New Issue
Block a user