Users

Users

Database Information


Database Name

Database Type

Collection Name

Database Name

Database Type

Collection Name

%tenant_code%_urac

MongoDB

users

 

Record Explanation


 

Field Name

Type

Mandatory

Unique

Indexed

Description

 

Field Name

Type

Mandatory

Unique

Indexed

Description

_id

Mongo ID

YES

YES

YES

Mongo Record ID

username

String

YES

YES

YES

The UserName

password

Hash

YES

NO

NO

The User Password

firstName

String

YES

NO

NO

The User First Name

lastName

String

YES

NO

NO

The User Last Name

email

String

YES

YES

YES

The User Email

status

String

YES

NO

NO

The User Status pendingJoin or active

profile

Object

NO

NO

NO

Additional User Info.

socialId

Object

NO

NO

NO

Information pertaining to login integration with social platforms

 

%strategy%

Object

 

 

 

The social platform name. facebook, google, twitter, etc

 

 

id

String

YES

YES

YES

The id of the user at the social platform

 

 

accessToken

String

NO

YES

NO

An access token that can be used to validate if the social user account is still valid

config

Object

NO

NO

NO

 

 



Field Name

Type

Mandatory

Unique

Indexed

Description

allowedTenants

Array

NO

NO

NO

Sub tenant access

keys

Object

YES

NO

NO

 Overridden ACL Keys

packages

Object

NO

NO

NO

 Overridden ACL Packages





Field Name

Type

Mandatory

Unique

Indexed

Description

%packageName%

Object

NO

NO

NO







Field Name

Type

Mandatory

Unique

Indexed

Description

acl

Object

NO

NO

NO







Field Name

Type

Mandatory

Unique

Indexed

Description

access

Boolean or Array

NO

NO

NO



apisPermission

String

NO

NO

NO



apis

Object

NO

NO

NO







Field Name

Type

Mandatory

Unique

Indexed

Description

%apiRoute%

Object

YES

NO

NO







Field Name

Type

Mandatory

Unique

Indexed

Description

access

Object

NO

NO

NO



tenant

Object

 YES

 NO

NO 

 

 



Field Name

Type

Mandatory

Unique

Indexed

Description

id

String

YES

NO

NO

Tenant ID

code

String

YES

NO

NO

Tenant Code 

groups

Array

YES

NO

NO

Array Of Group Codes

ts

Time stamp

YES

NO

NO

record created timestamp

 

Sample


User Record Sample
var data = { "_id": ObjectId('57063608622c47b5c097d19b'), "locked": true, "username": "owner", "password": "$2a$04$GfQ/6TJX82HcCoq8z8R44uN6x38hmJVIh7sKXIxknjt9UjN/f90sy", "firstName": "owner", "lastName": "owner", "email": "owner@soajs.org", "ts": 1460024840683, "status": "active", "profile": {}, "socialId": { "facebook": { "id": "10153921831136546", "accessToken": "EAAEtfZBue5g4BAHxZC795RjLBHzM044Rd1lqJDMUzj1FNDkZD" }, "google": { "id": "116534884477427572518", "accessToken": "ya29.Ci-gA_tPPWbT0qp5a3z4UwqzyIj1hQsMUuQ03mAmXFZQnVcaRsrmqJzK10oeBeIYGg", "refreshToken": "1/CnxzVU1kKh5NQsIJT5Mv2LkGguGCQqpVgwB0MuG7Qhc" } }, "groups": [ "owner" ], "config": { "allowedTenants": [ { "tenant": { "id": "THYME_tID", "code": "THYME_CODE", "pin": { "code": "5678", "allowed": true } }, "groups": [ "waiter" ] }, { "tenant": { "id": "ELVIRA_tID", "code": "ELVIRA_CODE" }, "groups: [ "manager" ] } ] "packages": {}, "keys": {} }, "lastLogin": 1555968525788, "tenant": { "id": "5551aca9e179c39b760f7a1a", "code": "DBTN" "pin": { "code": "1235", "allowed": true } } }