[Bio] / FigKernelPackages / RAST_submission.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/RAST_submission.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Fri Oct 23 18:30:17 2009 UTC revision 1.9, Mon Oct 26 18:19:57 2009 UTC
# Line 615  Line 615 
615              next;              next;
616          }          }
617    
618          if (!$self->user_may_access_job($job))          if (!($self->user_may_access_job($job) && $self->user_owns_job($job)))
619          {          {
620              $res->{$job_num} = { status => 'error', error_msg => 'Access denied' };              $res->{$job_num} = { status => 'error', error_msg => 'Access denied' };
621              next;              next;
# Line 726  Line 726 
726              next;              next;
727          }          }
728    
729          if (!$self->user_may_access_job($job))          if (!($self->user_may_access_job($job) && $self->user_owns_job($job)))
730          {          {
731              $res->{$job_num} = { status => 'error', error_msg => 'Access denied' };              $res->{$job_num} = { status => 'error', error_msg => 'Access denied' };
732              next;              next;
# Line 821  Line 821 
821    
822  sub user_may_access_job  sub user_may_access_job
823  {  {
824      my($self, $job_id) = @_;      my($self, $job) = @_;
825    
826        return $self->user_obj->has_right(undef, 'view', 'genome', $job->genome_id);
827    }
828    
829    sub user_owns_job
830    {
831        my($self, $job) = @_;
832    
833        my $userid = $self->user_obj->login();
834    
835      return 1;      return $job->owner->login() eq $userid;
836  }  }
837    
838    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3