added permission

This commit is contained in:
kremsy 2014-01-28 20:14:21 +01:00 committed by Steffen Schröder
parent d46c754d27
commit d9af2805cd
3 changed files with 5 additions and 2 deletions

View File

@ -139,7 +139,9 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$quad->setHAlign(Control::RIGHT); $quad->setHAlign(Control::RIGHT);
$quad->setSize(29, 4); $quad->setSize(29, 4);
$quad->setAction(self::ACTION_CLEAR_MAPQUEUE); $quad->setAction(self::ACTION_CLEAR_MAPQUEUE);
}
if ($this->maniaControl->authenticationManager->checkPermission($player, MapManager::SETTING_PERMISSION_CHECK_UPDATE)) {
//Check Update //Check Update
$label = new Label_Button(); $label = new Label_Button();
$frame->add($label); $frame->add($label);
@ -166,7 +168,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$mxQuad->setAction(self::ACTION_CHECK_UPDATE); $mxQuad->setAction(self::ACTION_CHECK_UPDATE);
} }
// Headline // Headline
$headFrame = new Frame(); $headFrame = new Frame();
$frame->add($headFrame); $frame->add($headFrame);

View File

@ -29,6 +29,7 @@ class MapManager implements CallbackListener {
const SETTING_PERMISSION_ADD_MAP = 'Add Maps'; const SETTING_PERMISSION_ADD_MAP = 'Add Maps';
const SETTING_PERMISSION_REMOVE_MAP = 'Remove Maps'; const SETTING_PERMISSION_REMOVE_MAP = 'Remove Maps';
const SETTING_PERMISSION_SHUFFLE_MAPS = 'Shuffle Maps'; const SETTING_PERMISSION_SHUFFLE_MAPS = 'Shuffle Maps';
const SETTING_PERMISSION_CHECK_UPDATE = 'Check Map Update';
/** /**
* Public Properties * Public Properties
@ -72,6 +73,7 @@ class MapManager implements CallbackListener {
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_ADD_MAP, AuthenticationManager::AUTH_LEVEL_ADMIN); $this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_ADD_MAP, AuthenticationManager::AUTH_LEVEL_ADMIN);
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_REMOVE_MAP, AuthenticationManager::AUTH_LEVEL_ADMIN); $this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_REMOVE_MAP, AuthenticationManager::AUTH_LEVEL_ADMIN);
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_SHUFFLE_MAPS, AuthenticationManager::AUTH_LEVEL_ADMIN); $this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_SHUFFLE_MAPS, AuthenticationManager::AUTH_LEVEL_ADMIN);
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_CHECK_UPDATE, AuthenticationManager::AUTH_LEVEL_MODERATOR);
} }
/** /**

View File

@ -89,7 +89,7 @@ class MapQueue implements CallbackListener, CommandListener {
} }
/**a /**
* Adds a Map to the map-queue * Adds a Map to the map-queue
* *
* @param $login * @param $login