Fogbugz #41: add admin? to user model in support of CanCan.

This commit is contained in:
Roland 2011-06-20 23:12:19 +02:00
parent c81b56b421
commit 303855be96

View file

@ -7,4 +7,10 @@ class User < ActiveRecord::Base
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
# This is needed by CanCan
def admin?
email === "roland@gasbottle-county.eu" ? ret = true : ret = false
ret
end
end