summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-29 12:08:25 +0100
committerAzul <azul@leap.se>2012-10-29 12:08:25 +0100
commita2a8caf577415ef51c0f99da43f9b47bde226fc6 (patch)
treecbb982c7868b8eabc8857af8cd85394c58335814 /users/app/models
parent2c2a80812818362d0e0c416deefd4aee2787dd9e (diff)
first steps at is_admin?
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/user.rb7
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