27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
|
diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
|
||
|
index 44ceebcf..8146df20 100644
|
||
|
--- a/src/remotedesktop.cpp
|
||
|
+++ b/src/remotedesktop.cpp
|
||
|
@@ -22,6 +22,8 @@
|
||
|
#include <QDBusReply>
|
||
|
#include <QGuiApplication>
|
||
|
#include <QRegion>
|
||
|
+#include <KSharedConfig>
|
||
|
+#include <KConfigGroup>
|
||
|
#include <QScreen>
|
||
|
|
||
|
#include "permission_store.h"
|
||
|
@@ -224,7 +226,10 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
|
||
|
notification->setIconName(QStringLiteral("krfb"));
|
||
|
notification->sendEvent();
|
||
|
} else {
|
||
|
- if (!isAppMegaAuthorized(app_id)) { // authorize right away
|
||
|
+ auto cfg = KSharedConfig::openConfig(QStringLiteral("plasmaremotedesktoprc"));
|
||
|
+ const auto unattendedAccess = cfg->group("Sharing").readEntry("Unattended", false);
|
||
|
+ if (!unattendedAccess || !isAppMegaAuthorized(app_id)) // authorize right away
|
||
|
+ {
|
||
|
QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
|
||
|
new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode()));
|
||
|
Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
|
||
|
|