From cfd77db90cf604e2f30afa5a0a1466cddfeeb9ac Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 23 Apr 2018 15:13:06 +0200 Subject: [PATCH] [ContextMenu Containment Action] Fix checking for KIOSK Anyone else checks for run_command. Docs explicitly mention the fact that you have to also disable action/run_command for the menu entry to appear but this is a bit awkward, isn't it. Also fix logout to check for the correct place as listed in documentation and other code places. BUG: 393329 FIXED-IN: 5.15.5 Differential Revision: https://phabricator.kde.org/D12376 --- containmentactions/contextmenu/menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containmentactions/contextmenu/menu.cpp b/containmentactions/contextmenu/menu.cpp index 924d088dd..89b6fed0b 100644 --- a/containmentactions/contextmenu/menu.cpp +++ b/containmentactions/contextmenu/menu.cpp @@ -166,7 +166,7 @@ QAction *ContextMenu::action(const QString &name) return c->corona()->actions()->action(QStringLiteral("add panel")); } } else if (name == QLatin1String("_run_command")) { - if (KAuthorized::authorizeAction(QStringLiteral("run_command"))) { + if (KAuthorized::authorizeAction(QStringLiteral("run_command")) && KAuthorized::authorize(QStringLiteral("run_command"))) { return m_runCommandAction; } } else if (name == QLatin1String("_lock_screen")) { @@ -174,7 +174,7 @@ QAction *ContextMenu::action(const QString &name) return m_lockScreenAction; } } else if (name == QLatin1String("_logout")) { - if (KAuthorized::authorizeAction(QStringLiteral("logout"))) { + if (KAuthorized::authorize(QStringLiteral("logout"))) { return m_logoutAction; } } else if (name == QLatin1String("lock widgets")) {