From: Marius Gavrilescu Date: Sat, 20 Dec 2014 14:41:07 +0000 (+0200) Subject: Make job_list only return public jobs X-Git-Tag: 5999.000_013~4 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=c29875088440fd6af00925ecd55bf7fb8a59ad4d;p=gruntmaster-data.git Make job_list only return public jobs --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index e514970..6de2fa2 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -127,7 +127,7 @@ sub contest_entry { sub job_list { my ($self, %args) = @_; $args{page} //= 1; - my $rs = $self->jobs->search(undef, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}}); + my $rs = $self->jobs->search({private => 0}, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}}); $rs = $rs->search({'me.owner' => $args{owner}}) if $args{owner}; $rs = $rs->search({contest => $args{contest}}) if $args{contest}; $rs = $rs->search({problem => $args{problem}}) if $args{problem};