diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 9e8cbc0..afb3f04 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -144,6 +144,9 @@ class User < ActiveRecord::Base self.pin_hash == Digest::SHA2.hexdigest( "#{self.pin_salt}#{entered_pin}" ) end + def admin? + self.user_groups.include?(UserGroup.find(2)) + end private |