summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/app/models/user.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index 1afb9db..b57af98 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -44,7 +44,10 @@ class User < CouchRest::Model::Base
end
def to_json(options={})
- super(options.merge(:only => ['login', 'password_salt']))
+ {
+ :login => login,
+ :ok => valid?
+ }.to_json(options)
end
def initialize_auth(aa)
@@ -70,4 +73,8 @@ class User < CouchRest::Model::Base
Thread.current[:user] = user
end
+ def self.current_test
+ User.first
+ end
+
end