Module: MusefindUser

Defined in:
lib/musefind_user/user.rb,
lib/musefind_user.rb,
lib/musefind_user/version.rb

Overview

This user class is an abstract representation of the user that is stored inside the users database. When a request is made, a load balancer fills the header with a specific json structure expected by various applications. This is parsed here to represent the version of a user.

This is the current version of the json structure. Any changes could change how all the other applications react. The companies are represented as an array of companies that this user is a part of. This allows us to find the brands and the influencer agencies that this user can potentially access. {

user_id: 2,
profile: {
  email: '[email protected]',
  name: 'Colin',
  username: 'coldog',
  activated: true
},
role: 'SUPERADMIN',
subscriptions: [
  {plan: 'test', status: 'active'}
],
companies: [1, 2, 3, 4, 5]

}

Defined Under Namespace

Classes: User

Constant Summary collapse

VERSION =
'1.3.0'