Fogbugz #41: add admin? to user model in support of CanCan.
This commit is contained in:
parent
c81b56b421
commit
303855be96
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue