allow Seminary moderators to access all Achievement media

This commit is contained in:
coderkun 2014-07-08 13:55:48 +02:00
commit 1e3f25c0cf

View file

@ -249,9 +249,11 @@
switch($locked) switch($locked)
{ {
case null: case null:
if(count(array_intersect(array('admin', 'moderator'), \hhu\z\controllers\SeminaryController::$character['characterroles'])) == 0) {
if(is_null($character) || !$this->Achievements->hasCharacterAchievedAchievement($achievement['id'], $character['id'])) { if(is_null($character) || !$this->Achievements->hasCharacterAchievedAchievement($achievement['id'], $character['id'])) {
throw new \nre\exceptions\AccessDeniedException(); throw new \nre\exceptions\AccessDeniedException();
} }
}
$index = 'achieved_achievementsmedia_id'; $index = 'achieved_achievementsmedia_id';
break; break;
case 'locked': case 'locked':