Update PluginMenu.php to partly fix issue #177 (#179)

This update partly fixes the issue https://github.com/ManiaControl/ManiaControl/issues/177 in the plugin activation/deactivation/changing case. It's not the perfect code, because it should be fixed inside core/Plugins/PluginManager.php, but it fixes the issue for now.
This commit is contained in:
axelalex2 2018-06-05 20:47:36 +02:00 committed by Lukas Kremsmayr
parent 910d59a377
commit f39b14ba61
1 changed files with 6 additions and 0 deletions

View File

@ -360,6 +360,12 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
return;
}
if (!$this->maniaControl->getAuthenticationManager()->checkPermission($player, self::SETTING_PERMISSION_CHANGE_PLUGIN_SETTINGS))
{
$this->maniaControl->getAuthenticationManager()->sendNotAllowed($player);
return;
}
if ($enable) {
$pluginClass = substr($actionId, strlen(self::ACTION_PREFIX_ENABLEPLUGIN));
/** @var Plugin $pluginClass */