make "run associated application" obey security
svn path=/trunk/KDE/kdelibs/; revision=1081144
This commit is contained in:
parent
b6ab41d131
commit
14c45f179f
@ -1959,6 +1959,7 @@ void Applet::setAssociatedApplication(const QString &string)
|
||||
QAction *runAssociatedApplication = d->actions->action("run associated application");
|
||||
if (runAssociatedApplication) {
|
||||
bool valid = AssociatedApplicationManager::self()->appletHasValidAssociatedApplication(this);
|
||||
valid = valid && hasAuthorization("LaunchApp"); //obey security!
|
||||
runAssociatedApplication->setVisible(valid);
|
||||
runAssociatedApplication->setEnabled(valid);
|
||||
}
|
||||
@ -1971,6 +1972,7 @@ void Applet::setAssociatedApplicationUrls(const KUrl::List &urls)
|
||||
QAction *runAssociatedApplication = d->actions->action("run associated application");
|
||||
if (runAssociatedApplication) {
|
||||
bool valid = AssociatedApplicationManager::self()->appletHasValidAssociatedApplication(this);
|
||||
valid = valid && hasAuthorization("LaunchApp"); //obey security!
|
||||
runAssociatedApplication->setVisible(valid);
|
||||
runAssociatedApplication->setEnabled(valid);
|
||||
}
|
||||
@ -1988,7 +1990,9 @@ KUrl::List Applet::associatedApplicationUrls() const
|
||||
|
||||
void Applet::runAssociatedApplication()
|
||||
{
|
||||
if (hasAuthorization("LaunchApp")) {
|
||||
AssociatedApplicationManager::self()->run(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool Applet::hasValidAssociatedApplication() const
|
||||
|
Loading…
Reference in New Issue
Block a user