Skip to content

Commit

Permalink
Merge pull request #852 from sparc-request/jjh-report-export
Browse files Browse the repository at this point in the history
View Consolidated Request button Not working [#136963065]
  • Loading branch information
jleonardw9 committed Jan 3, 2017
2 parents 455bc54 + 9e23f64 commit 42bfd66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/service_calendars_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def authorize_dashboard_access
end

def authorize_protocol
@protocol = Arm.find(params[:arm_id]).protocol
@protocol = if params[:protocol_id]
Protocol.find(params[:protocol_id])
else
Arm.find(params[:arm_id]).protocol
end
permission_to_view = @protocol.project_roles.where(identity_id: current_user.id, project_rights: ['approve', 'request']).any?

unless permission_to_view || Protocol.for_admin(current_user.id).include?(@protocol)
Expand Down

0 comments on commit 42bfd66

Please sign in to comment.