Hide hidden jobsets for project admins by default

This unclutters project pages.

Fixes #390.
This commit is contained in:
Eelco Dolstra
2016-10-27 16:46:20 +02:00
parent 3c8f00c76f
commit a2be29377e
5 changed files with 34 additions and 4 deletions

View File

@ -14,6 +14,8 @@ sub projectChain :Chained('/') :PathPart('project') :CaptureArgs(1) {
$c->stash->{project} = $c->model('DB::Projects')->find($projectName);
$c->stash->{isProjectOwner} = isProjectOwner($c, $c->stash->{project});
notFound($c, "Project $projectName doesn't exist.")
if !$c->stash->{project} && !($c->action->name eq "project" and $c->request->method eq "PUT");
}