summaryrefslogtreecommitdiff
path: root/users/app/models/user.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-04 17:57:03 +0100
committerAzul <azul@leap.se>2012-11-04 17:57:03 +0100
commitc0f92bf9f481463dcaef6f4b30343130a8910a00 (patch)
tree3ba89c6f38d19a7b96a0ef599b7cb6364ba5821f /users/app/models/user.rb
parentb92d418ebec6486a9e728c57f38f82d4c3343341 (diff)
parent19008253d01fd6d7a864e98a7ae5dc216070aee1 (diff)
Merge branch 'develop' into feature-warden-srp
Conflicts: Gemfile.lock users/app/controllers/application_controller.rb users/leap_web_users.gemspec
Diffstat (limited to 'users/app/models/user.rb')
-rw-r--r--users/app/models/user.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index 737e083..0f5d650 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -66,11 +66,9 @@ class User < CouchRest::Model::Base
login
end
- def self.current
- Thread.current[:user]
- end
- def self.current=(user)
- Thread.current[:user] = user
+ # Since we are storing admins by login, we cannot allow admins to change their login.
+ def is_admin?
+ APP_CONFIG['admins'].include? self.login
end
end