Commit 36e9218f authored by pontaoski's avatar pontaoski 🌈
Browse files

[kcms/users] Bail out on trying to apply user when an error encounters

While there's not a graceful way to discern between user cancellation and an actual error,
the former is more likely so we bail out when encountering an error.

BUG: 422175
parent b42deabe
......@@ -253,7 +253,15 @@ void UserApplyJob::start()
// will return permission denied if there's a polkit dialog open while a
// request is made.
for (auto const &x: set) {
(m_dbusIface->*(x.second))(x.first).waitForFinished();
auto resp = (m_dbusIface->*(x.second))(x.first);
resp.waitForFinished();
// We don't have a meaningful way to discern between errors and
// user cancellation; but user cancellation is more likely than errors
// so go with that.
if (resp.isError()) {
emitResult();
return;
}
}
m_dbusIface->SetAccountType(m_type).waitForFinished();
emitResult();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment