From e2f19bcfb6dbce77746c2d61715340525b29a592 Mon Sep 17 00:00:00 2001 From: NavaL Date: Wed, 22 Jun 2016 19:17:15 +0200 Subject: [feature] expose is_admin in the user api So that whoever consumes the API can use this attribute to determine if admin functionalities should be made available to the current user. --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/user.rb b/app/models/user.rb index cb093cf..e3246ad 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,7 +75,8 @@ class User < CouchRest::Model::Base :login => self.login, :ok => self.valid?, :id => self.id, - :enabled => self.enabled? + :enabled => self.enabled?, + :is_admin => self.is_admin? }.to_json(options) end -- cgit v1.2.3