added permission
This commit is contained in:
parent
d46c754d27
commit
d9af2805cd
@ -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);
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user