Class: Symgate::Auth::User
Overview
defines a symgate user
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ User
constructor
A new instance of User.
- #to_s ⇒ Object
- #to_soap(hash) ⇒ Object
Methods inherited from Type
#==, hash_value_with_optional_namespace
Constructor Details
#initialize(opts = {}) ⇒ User
Returns a new instance of User.
7 8 9 10 |
# File 'lib/symgate/auth/user.rb', line 7 def initialize(opts = {}) super(opts) @is_group_admin = opts[:is_group_admin] || false end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/symgate/auth/user.rb', line 26 def to_s @user_id + (@is_group_admin ? '(admin)' : '') end |
#to_soap(hash) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/symgate/auth/user.rb', line 19 def to_soap(hash) hash[:'auth:user'] = '' hash[:attributes!] = {} unless hash.include? :attributes! hash[:attributes!][:'auth:user'] = { id: @user_id } hash[:attributes!][:'auth:user'][:isGroupAdmin] = @is_group_admin if @is_group_admin end |