Fixed archive public page

This commit is contained in:
Dmitry Khomutov 2017-01-19 21:58:45 +07:00
commit 9968983172
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
3 changed files with 13 additions and 13 deletions

View file

@ -170,19 +170,18 @@ class BuildStatusController extends Controller
/**
* View the public status page of a given project, if enabled.
* @param $projectId
*
* @param integer $projectId
*
* @return string
*
* @throws \b8\Exception\HttpException\NotFoundException
*/
public function view($projectId)
{
$project = $this->projectStore->getById($projectId);
if (empty($project)) {
throw new NotFoundException('Project with id: ' . $projectId . ' not found');
}
if (!$project->getAllowPublicStatus()) {
if (empty($project) || !$project->getAllowPublicStatus() || $project->getArchived()) {
throw new NotFoundException('Project with id: ' . $projectId . ' not found');
}