mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
Oops - fix a true/false reversal in the sysadm/users "userdelete" "clean_home" optional argument.
This commit is contained in:
@@ -931,7 +931,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmUserRequest(bool allaccess,
|
||||
QString deluser = in_args.toObject().value("name").toString();
|
||||
if(deluser != user){ //cannot delete the currently-used user
|
||||
bool clean = true;
|
||||
if(in_args.toObject().contains("clean_home")){ clean = (in_args.toObject().value("clean_home").toString().toLower() == "false"); }
|
||||
if(in_args.toObject().contains("clean_home")){ clean = (in_args.toObject().value("clean_home").toString().toLower() != "false"); }
|
||||
ok = sysadm::UserManager::removeUser(deluser, clean);
|
||||
if(ok){ out->insert("result","success"); }
|
||||
else{ out->insert("error","Could not delete user"); }
|
||||
|
||||
@@ -212,14 +212,14 @@ QJsonObject BEADM::listBEs() {
|
||||
|
||||
// Unmount the given boot environment immediately. Confirmation should be done through the client.
|
||||
|
||||
QJsonObject BEADM::umountBE(QJsonObject jsin) {
|
||||
QJsonObject retObject;
|
||||
QJsonObject BEADM::umountBE(QJsonObject jsin) {
|
||||
QJsonObject retObject;
|
||||
|
||||
QStringList keys = jsin.keys();
|
||||
if (! keys.contains("be") ) {
|
||||
retObject.insert("error", "Missing required key(s) 'be'");
|
||||
return retObject;
|
||||
}
|
||||
QStringList keys = jsin.keys();
|
||||
if (! keys.contains("be") ) {
|
||||
retObject.insert("error", "Missing required key(s) 'be'");
|
||||
return retObject;
|
||||
}
|
||||
|
||||
// Get the key values
|
||||
|
||||
@@ -238,4 +238,4 @@ QJsonObject BEADM::listBEs() {
|
||||
|
||||
retObject.insert("be", be);
|
||||
return retObject;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user