summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 61793be..51e9279 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -68,8 +68,10 @@ class User < CouchRest::Model::Base
def to_json(options={})
{
- :login => login,
- :ok => valid?
+ :login => self.login,
+ :ok => self.valid?,
+ :id => self.id,
+ :enabled => self.enabled?
}.to_json(options)
end
@@ -107,6 +109,10 @@ class User < CouchRest::Model::Base
false
end
+ def is_monitor?
+ false
+ end
+
def most_recent_tickets(count=3)
Ticket.for_user(self).limit(count).all #defaults to having most recent updated first
end