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 when going from
KApplication::authorize to KAuthorized in kdelibs3 to kdelibs4.

To currently block shell access a sysadmin currently needs to
have both keys set already, so we can be confident it won't have any
actual compatibility problems.
wilder-5.14
David Edmundson 10 years ago
parent 9f3d7a3233
commit aa20144814
  1. 2
      runners/shell/shellrunner.cpp

@ -42,7 +42,7 @@ ShellRunner::ShellRunner(QObject *parent, const QVariantList &args)
setObjectName( QLatin1String("Command" ));
setPriority(AbstractRunner::HighestPriority);
setHasRunOptions(true);
m_enabled = KAuthorized::authorizeKAction(QStringLiteral("run_command")) && KAuthorized::authorizeKAction(QStringLiteral("shell_access"));
m_enabled = KAuthorized::authorize(QStringLiteral("run_command")) && KAuthorized::authorize(QStringLiteral("shell_access"));
setIgnoredTypes(Plasma::RunnerContext::Directory | Plasma::RunnerContext::File |
Plasma::RunnerContext::NetworkLocation | Plasma::RunnerContext::UnknownType |
Plasma::RunnerContext::Help);

Loading…
Cancel
Save