check rights for open admin panel

This commit is contained in:
kremsy 2014-01-01 21:05:45 +01:00
parent 98dfae02bd
commit f37d506867

View File

@ -131,7 +131,9 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
* @param array $callback
*/
public function openAdminMenu(array $callback, Player $player) {
$this->maniaControl->configurator->toggleMenu($player);
if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)){
$this->maniaControl->configurator->toggleMenu($player);
}
}
/**
@ -162,7 +164,8 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
$frame->add($backgroundQuad);
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$iconFrame = new Frame();
$frame->add($iconFrame);