diff options
author | Azul <azul@leap.se> | 2012-10-29 12:08:25 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-10-29 12:08:25 +0100 |
commit | a2a8caf577415ef51c0f99da43f9b47bde226fc6 (patch) | |
tree | cbb982c7868b8eabc8857af8cd85394c58335814 /users | |
parent | 2c2a80812818362d0e0c416deefd4aee2787dd9e (diff) |
first steps at is_admin?
Diffstat (limited to 'users')
-rw-r--r-- | users/app/models/user.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb index 1afb9db..9bbf169 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -63,11 +63,8 @@ class User < CouchRest::Model::Base login end - def self.current - Thread.current[:user] - end - def self.current=(user) - Thread.current[:user] = user + def is_admin? + APP_CONFIG['admins'].include? self.id end end |