lib/you_track/client/models/user.rb in you_track-0.4.0 vs lib/you_track/client/models/user.rb in you_track-0.4.1
- old
+ new
@@ -1,9 +1,9 @@
class YouTrack::Client::User < YouTrack::Client::Model
- identity :id, aliases: ["fullName", "email"]
+ identity :id, aliases: ["email"]
+ attribute :name, alias: "fullName"
attribute :last_created_project, aliases: ["lastCreatedProject"]
- attribute :email, aliases: ["email"]
def admin? # just try to make a request to the admin api and see what happens
return @admin if defined?(@admin) # i love how ||= doesn't work when a variable is false
@admin = !!service.get_admin_user(self.id).body
rescue Faraday::ResourceNotFound