Commit aa4d0945 authored by David Edmundson's avatar David Edmundson

Port all instances of Kauthorized action/shell_command to shell_command

The KAuthorized key to prevent shell access according the documentation
is simply "shell_action" not "action/shellAction" so should use
authorize not authorizeKAction

This appears to have come about as part of a porting bug from
KApplication::authorize to KAuthorized in kdelibs3 to kdelibs4.

To actually block konsole and any effect a sysadmin currently needs to
have both keys set already, so we can be confident it won't have any
actual compatibility problems.

REVIEW: 127964
parent 3434a038
......@@ -46,7 +46,7 @@
#include <KPluginFactory>
#include <kaboutdata.h>
#include <kpluginfactory.h>
#include <kauthorized.h>
#include <KAuthorized>
#include <KConfigGroup>
#include <KSharedConfig>
#include <KXMLGUIFactory>
......@@ -57,7 +57,7 @@ KateKonsolePlugin::KateKonsolePlugin( QObject* parent, const QList<QVariant>& ):
KTextEditor::Plugin ( parent )
{
m_previousEditorEnv=qgetenv("EDITOR");
if (!KAuthorized::authorizeKAction(QStringLiteral("shell_access")))
if (!KAuthorized::authorize(QStringLiteral("shell_access")))
{
KMessageBox::sorry(0, i18n ("You do not have enough karma to access a shell or terminal emulation"));
}
......
......@@ -31,7 +31,7 @@
#include <kprocess.h>
#include <KPluginFactory>
#include <kauthorized.h>
#include <KAuthorized>
#include <kactioncollection.h>
#include <KXMLGUIFactory>
#include <KConfigGroup>
......@@ -149,7 +149,7 @@ static void slipInFilter(KProcess & proc, KTextEditor::View & view, QString comm
void PluginKateTextFilter::slotEditFilter()
{
if (!KAuthorized::authorizeKAction(QStringLiteral("shell_access"))) {
if (!KAuthorized::authorize(QStringLiteral("shell_access"))) {
KMessageBox::sorry(0,i18n(
"You are not allowed to execute arbitrary external applications. If "
"you want to be able to do this, contact your system administrator."),
......
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