check rights for open admin panel
This commit is contained in:
parent
98dfae02bd
commit
f37d506867
@ -131,8 +131,10 @@ 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) {
|
||||||
|
if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)){
|
||||||
$this->maniaControl->configurator->toggleMenu($player);
|
$this->maniaControl->configurator->toggleMenu($player);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle OpenPlayerMenu Action
|
* Handle OpenPlayerMenu Action
|
||||||
@ -163,6 +165,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
|||||||
$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