aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-04 09:06:04 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-04 09:06:09 +1100
commitd16f5b29e106d6f5f8191b7f881386f281f98691 (patch)
tree48680eb5c46635f48d5b56755e66827cac53f144
parentab8f4379a6b43cd5578a6a7d6268cb904e69b2ff (diff)
Use Ability::can_update_request_state? in RequestController#describe_state
-rw-r--r--app/controllers/request_controller.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index f958a4746..36ec7ee13 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -384,13 +384,12 @@ class RequestController < ApplicationController
return
end
- # Check authenticated, and parameters set. We check is_owning_user
- # to get admin overrides (see is_owning_user? above)
- if !(authenticated_user && info_request.is_old_unclassified?) && !info_request.is_owning_user?(authenticated_user) && !authenticated_as_user?(info_request.user,
+ # Check authenticated, and parameters set.
+ unless Ability::can_update_request_state?(authenticated_user, info_request)
+ authenticated_as_user?(info_request.user,
:web => _("To classify the response to this FOI request"),
:email => _("Then you can classify the FOI response you have got from ") + info_request.public_body.name + ".",
- :email_subject => _("Classify an FOI response from ") + info_request.public_body.name
- )
+ :email_subject => _("Classify an FOI response from ") + info_request.public_body.name)
# do nothing - as "authenticated?" has done the redirect to signin page for us
return
end