lib/cfoundry/v2/user.rb in cfoundry-0.3.6 vs lib/cfoundry/v2/user.rb in cfoundry-0.3.7

- old
+ new

@@ -1,26 +1,30 @@ require "cfoundry/v2/model" module CFoundry::V2 class User < Model - to_many :app_spaces + to_many :spaces to_many :organizations to_many :managed_organizations, :as => :organization to_many :billing_managed_organizations, :as => :organization to_many :audited_organizations, :as => :organization - to_many :managed_app_spaces, :as => :app_space - to_many :audited_app_spaces, :as => :app_space + to_many :managed_spaces, :as => :space + to_many :audited_spaces, :as => :space attribute :admin - to_one :default_app_space, :as => :app_space + to_one :default_space, :as => :space attribute :guid # guid is explicitly set for users - alias :admin? :admin + def guid + @guid + end - alias :spaces :app_spaces - alias :managed_spaces :managed_app_spaces - alias :audited_spaces :audited_app_spaces - alias :default_space :default_app_space + def guid=(x) + @guid = x + super + end + + alias :admin? :admin # optional metadata from UAA attr_accessor :emails, :name def email