Skip to content

Commit

Permalink
Disable manual upload on closed requests.
Browse files Browse the repository at this point in the history
Fixes #7185.
  • Loading branch information
dracos committed Sep 7, 2023
1 parent 9c2d9b6 commit a87e374
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ def upload_response
return false
end

if @info_request.allow_new_responses_from == 'nobody'
render template: 'request/request_subtitle/allow_new_responses_from/_nobody'

Check warning on line 375 in app/controllers/request_controller.rb

View workflow job for this annotation

GitHub Actions / build

[rubocop] reported by reviewdog 🐶 Layout/LineLength: Line is too long. [84/80] (https://rubystyle.guide#max-line-length) Raw Output: app/controllers/request_controller.rb:375:81: C: Layout/LineLength: Line is too long. [84/80] (https://rubystyle.guide#max-line-length) render template: 'request/request_subtitle/allow_new_responses_from/_nobody' ^^^^
return
end

unless @info_request.public_body.is_foi_officer?(@user)
domain_required = @info_request.public_body.foi_officer_domain_required
if domain_required.nil?
Expand Down
2 changes: 2 additions & 0 deletions app/views/request/_after_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</li>
<% end %>
<% if info_request.allow_new_responses_from != 'nobody' %>
<li class="action-menu__menu__item">
<span class="action-menu__menu__heading">
<%= _('{{public_body_name}}',
Expand All @@ -45,6 +46,7 @@
</li>
</ul>
</li>
<% end %>

<li class="action-menu__menu__item">
<ul class="action-menu__menu__submenu anyone_actions">
Expand Down

0 comments on commit a87e374

Please sign in to comment.