check rights for open admin panel
This commit is contained in:
parent
98dfae02bd
commit
f37d506867
@ -131,7 +131,9 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
* @param array $callback
|
* @param array $callback
|
||||||
*/
|
*/
|
||||||
public function openAdminMenu(array $callback, Player $player) {
|
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);
|
$frame->add($backgroundQuad);
|
||||||
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
$backgroundQuad->setSize($itemSize * $itemMarginFactorX, $itemSize * $itemMarginFactorY);
|
||||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||||
|
|
||||||
|
|
||||||
$iconFrame = new Frame();
|
$iconFrame = new Frame();
|
||||||
$frame->add($iconFrame);
|
$frame->add($iconFrame);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user