Added more comments.
This commit is contained in:
parent
80b856fd5b
commit
d4068d9359
1 changed files with 4 additions and 0 deletions
|
@ -225,7 +225,11 @@ class Ticket < ApplicationModel
|
||||||
end
|
end
|
||||||
|
|
||||||
# check agent
|
# check agent
|
||||||
|
|
||||||
|
# access if requestor is owner
|
||||||
return true if self.owner_id == data[:current_user].id
|
return true if self.owner_id == data[:current_user].id
|
||||||
|
|
||||||
|
# access if requestor is in group
|
||||||
data[:current_user].groups.each {|group|
|
data[:current_user].groups.each {|group|
|
||||||
return true if self.group.id == group.id
|
return true if self.group.id == group.id
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue