diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 11:25:23 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 11:25:23 -0400 |
commit | 0d6f7a3bfbf4c87510a1bcf967b618f98e149d49 (patch) | |
tree | e3cd7d5329bd3c04a2fbfc766db34766fab12bc3 /app/models/tournament.rb | |
parent | 8aefe73872571ac54738bde71d4da5611659a0cc (diff) |
clean up permission system
Diffstat (limited to 'app/models/tournament.rb')
-rw-r--r-- | app/models/tournament.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/tournament.rb b/app/models/tournament.rb index 8a96dcc..854b8c9 100644 --- a/app/models/tournament.rb +++ b/app/models/tournament.rb @@ -55,6 +55,10 @@ class Tournament < ActiveRecord::Base (not self.scoring_method.try(:empty?)) and (scoring_methods.include? scoring_method) end + def owned_by?(user) + self.hosts.include?(user) + end + # Settings ################################################################# def settings |