Skip to content

Commit

Permalink
Merge pull request #223 from paczian/master
Browse files Browse the repository at this point in the history
fixed star rights handling in abundanceprofile
  • Loading branch information
teharrison committed Jan 8, 2013
2 parents 624e90c + 34dd84e commit 0e44334
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/MGRAST/lib/resources2/abundanceprofile.pm
Expand Up @@ -114,7 +114,7 @@ sub instance {
$job = $job->[0];

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

Expand Down
12 changes: 6 additions & 6 deletions src/MGRAST/lib/resources2/metagenome.pm
Expand Up @@ -23,12 +23,12 @@ sub new {
"library" => [ 'reference library', 'reference to the related library object' ],
"sample" => [ 'reference sample', 'reference to the related sample object' ],
"project" => [ 'reference project', 'reference to the project object' ],
"metadata" => [ 'hash', 'key value pairs describing metadata' ],
"created" => [ 'date', 'time the object was first created' ],
"metadata" => [ 'hash', 'key value pairs describing metadata' ],
"created" => [ 'date', 'time the object was first created' ],
"version" => [ 'integer', 'version of the object' ],
"url" => [ 'uri', 'resource location of this object instance' ],
"status" => ['cv', [['public', 'object is public'],
['private', 'object is private']]],
"url" => [ 'uri', 'resource location of this object instance' ],
"status" => [ 'cv', [ ['public', 'object is public'],
['private', 'object is private'] ] ],
"sequence_type" => [ 'string', 'sequencing type' ]
};
return $self;
Expand Down Expand Up @@ -119,7 +119,7 @@ sub instance {
$job = $job->[0];

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

Expand Down

0 comments on commit 0e44334

Please sign in to comment.