Class: Kadmin::Auth::User

Inherits:
Object
  • Object
show all
Defined in:
lib/kadmin/auth/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email, options = {}) ⇒ User

Returns a new instance of User.



6
7
8
9
10
11
# File 'lib/kadmin/auth/user.rb', line 6

def initialize(email, options = {})
  @email = email
  @admin = options[:admin]
  @organization = options[:organization]
  @accept = options[:accept]
end

Instance Attribute Details

#acceptObject

Returns the value of attribute accept.



4
5
6
# File 'lib/kadmin/auth/user.rb', line 4

def accept
  @accept
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/kadmin/auth/user.rb', line 4

def email
  @email
end

#organizationObject

Returns the value of attribute organization.



4
5
6
# File 'lib/kadmin/auth/user.rb', line 4

def organization
  @organization
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/kadmin/auth/user.rb', line 21

def admin?
  return @admin
end

#authorized?(_request) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/kadmin/auth/user.rb', line 17

def authorized?(_request)
  return true
end