From e0bfe1981be07f2ab27131c52a20b15e6562822d Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 12 Nov 2012 14:41:16 -0800 Subject: Some test improvements. --- help/app/controllers/tickets_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'help/app') 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 -- cgit v1.2.3