Skip to content

Commit

Permalink
fixed public access of private items
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Harrison committed Jan 14, 2013
1 parent 5d3f0f9 commit fb3041a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MGRAST/lib/resources2/metagenome_statistics.pm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ sub instance {
$job = $job->[0];

# check rights
unless ($job->public || $self->user->has_right(undef, 'view', 'metagenome', $job->metagenome_id) || $self->user->has_star_right('view', 'metagenome')) {
unless ($job->public || ($self->user && ($self->user->has_right(undef, 'view', 'metagenome', $job->metagenome_id) || $self->user->has_star_right('view', 'metagenome')))) {
$self->return_data( {"ERROR" => "insufficient permissions to view this data"}, 401 );
}

Expand Down

0 comments on commit fb3041a

Please sign in to comment.