From d4068d935919826b7569f824ee3386e2c21e50cc Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 10 Jun 2013 11:44:31 +0200 Subject: [PATCH] Added more comments. --- app/models/ticket.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/ticket.rb b/app/models/ticket.rb index abf3e2251..b35b545da 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -225,7 +225,11 @@ class Ticket < ApplicationModel end # check agent + + # access if requestor is owner return true if self.owner_id == data[:current_user].id + + # access if requestor is in group data[:current_user].groups.each {|group| return true if self.group.id == group.id }