Verified Commit b440da01 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Change error when running as admin to warning

This changes the recently introduced check for users running
Kleopatra with elevated permissions to a warning. There are
still Windows users that run Kleopatra without any privilege
seperation whatsover on their system, they run everything
with full Administrative privileges. So for them the change
blocked usage of Kleopatra. I was unaware that this is still
possible in modern Windows versions as this is very hidden
and requires the user to disable safety systems.

GnuPG-Bug-Id: T5248
parent 86cf610a
Pipeline #48720 failed with stage
in 11 minutes and 51 seconds
......@@ -115,13 +115,16 @@ int main(int argc, char **argv)
* that you are temporarily running with the "normal" user environment but
* with elevated permissions.
* */
KMessageBox::sorry(nullptr, xi18nc("@info",
"<para><application>Kleopatra</application> cannot be run as adminstrator without "
"breaking file permissions in the GnuPG data folder.</para>"
"<para>To manage keys for other users please manage them as a normal user and "
"copy the <filename>AppData\\Roaming\\gnupg</filename> directory with proper permissions.</para>"),
i18nc("@title", "Running as Administrator"));
return EXIT_FAILURE;
if (KMessageBox::warningContinueCancel(nullptr, xi18nc("@info",
"<para><application>Kleopatra</application> cannot be run as adminstrator without "
"breaking file permissions in the GnuPG data folder.</para>"
"<para>To manage keys for other users please manage them as a normal user and "
"copy the <filename>AppData\\Roaming\\gnupg</filename> directory with proper permissions.</para>") +
xi18n("<para>Are you sure that you want to continue?</para>"),
i18nc("@title", "Running as Administrator")) != KMessageBox::Continue) {
return EXIT_FAILURE;
}
qCWarning(KLEOPATRA_LOG) << "User is running with administrative permissions.";
}
KUniqueService service;
......
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