Paste P585

Set details for polkit authentication dialog.
ActivePublic

Authored by chinmoyr on Apr 17 2020, 3:40 AM.
diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
index 67cfbf81..58c9ee4a 100644
--- a/src/ioslaves/file/file_unix.cpp
+++ b/src/ioslaves/file/file_unix.cpp
@@ -1331,6 +1331,10 @@ PrivilegeOperationReturnValue FileProtocol::execWithElevatedPrivilege(ActionType
QVariantMap argv;
argv.insert(QStringLiteral("arguments"), helperArgs);
execAction.setArguments(argv);
+
+ KAuth::DetailsMap details;
+ details.insert(KAuth::DetailMessage, QStringLiteral("Authentication is required to perform this action."));
+ execAction.setDetailsV2(details);
auto reply = execAction.execute();
if (reply->exec()) {
chinmoyr created this paste.Apr 17 2020, 3:40 AM
chinmoyr created this object in space S1 KDE Community.