summaryrefslogtreecommitdiff
path: root/help/app/controllers
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2012-11-12 14:41:16 -0800
committerjessib <jessib@riseup.net>2012-11-12 14:41:16 -0800
commite0bfe1981be07f2ab27131c52a20b15e6562822d (patch)
tree9c3c6bbd2597f353346d48e5b96b990232ad39e2 /help/app/controllers
parentdd26e22a3bcf0aebd16c518e44b8ab6a73bd7d0e (diff)
Some test improvements.
Diffstat (limited to 'help/app/controllers')
-rw-r--r--help/app/controllers/tickets_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb
index b76b051..102464a 100644
--- a/help/app/controllers/tickets_controller.rb
+++ b/help/app/controllers/tickets_controller.rb
@@ -41,7 +41,7 @@ class TicketsController < ApplicationController
redirect_to tickets_path, :alert => "No such ticket"
return
end
- authorize_ticket_access
+ ticket_access_denied? #authorize_ticket_access
# @ticket.comments.build
# build ticket comments?
end
@@ -49,7 +49,7 @@ class TicketsController < ApplicationController
def update
@ticket = Ticket.find(params[:id])
- if ticket_access?
+ if !ticket_access_denied?
if status = params[:change_status] #close or open button was pressed
@ticket.close if params[:change_status] == 'close'
@ticket.reopen if params[:change_status] == 'open'
@@ -128,7 +128,7 @@ class TicketsController < ApplicationController
@ticket and (admin? or !@ticket.created_by or (current_user and current_user.id == @ticket.created_by))
end
- def authorize_ticket_access
+ def ticket_access_denied?
access_denied unless ticket_access?
end