Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Field NameTypeMandatoryUniqueIndexedDescription
_idMongo IDYESYESYESMongo Record ID
usernameStringYESYESYESThe UserName
passwordHashYESNONOThe User Password
firstNameStringYESNONOThe User First Name
lastNameStringYESNONOThe User Last Name
emailStringYESYESYESThe User Email
statusStringYESNONOThe User Status pendingNew or active
profileObjectNONONOAdditional User Info.
socialIdObjectNONONOHolds the 3rd party information aka facebook, twitter, ...
configObjectNONONO



Field NameTypeMandatoryUniqueIndexedDescription

allowedTenants

ArrayNONONOSub tenant access
keysObjectYESNONO Overridden ACL Keys
packagesObjectNONONO Overridden ACL Packages



Field NameTypeMandatoryUniqueIndexedDescription
%packageName%ObjectNONO

NO





Field NameTypeMandatoryUniqueIndexedDescription
aclObjectNONONO



Field NameTypeMandatoryUniqueIndexedDescription
accessBoolean or ArrayNONONO
apisPermissionStringNONONO
apisObjectNONONO



Field NameTypeMandatoryUniqueIndexedDescription
%apiRoute%ObjectYESNONO



Field NameTypeMandatoryUniqueIndexedDescription
accessObjectNONONO







tenantObject YES NONO 



Field NameTypeMandatoryUniqueIndexedDescription
idStringYESNONOTenant ID
codeStringYESNONOTenant Code 


groupsArrayYESNONOArray Of Group Codes
tsTime stampYESNONOrecord created timestamp


Social ID

When you turn on 3rd party login integration, the user is added to URAC with socialId object that holds the 3rd party information as follow:

Code Block
title3rd party information
collapsetrue
{
	...
	socialId : {
		"facebook": {
         	"id": "10153921831136546",
			"ts": 1563462760715,
			"email" : {
				"modified" : true
			},
			"profile" : { / The original profile @ facebook / },
         	"accessToken": "EAAEtfZBue5g4BAHxZC795RjLBHzM044Rd1lqJDMUzj1FNDkZD"
      	},
      	"google": {
         	"id": "116534884477427572518",
			"ts": 1563462760715,
			"email" : {
				"modified" : true
			},
			"profile" : { / The original profile @ google / },
         	"accessToken": "ya29.Ci-gA_tPPWbT0qp5a3z4UwqzyIj1hQsMUuQ03mAmXFZQnVcaRsrmqJzK10oeBeIYGg",
         	"refreshToken": "1/CnxzVU1kKh5NQsIJT5Mv2LkGguGCQqpVgwB0MuG7Qhc"
      	}
		...
	}
	...
}


Sample

  1. This User has only access to the main tenant "DBTN" with the pin code (5511) but has no access to subtenants

...

var data =
Code Block
languagejs
titleUser Record Sample
collapsetrue
{
	"_id": ObjectId("5d308c68687aaf05b1c24097"),
	"locked": true,
	"username": "owner",
	"password": "$2a$12$geJJfv33wkYIXEAlDkeeuOgiQ6y6MjP/YxbqLdHdDSK7LDG.7n7Pq",
	"firstName": "owner",
	"lastName": "owner",
	"email": "me@localhost.com",
	"ts": Double(1563462760715.0),
	"status": "active",
	"profile": {},
	"groups": [
		"owner"
	],
	"config": {
		"packages": {},
		"keys": {}
	},
	"tenant": {
		"id": "5c0e74ba9acc3c5a84a51259",
		"code": "DBTN"
		"pin": {
			"code": 5511,
			"allowed": true
		}
	},
	"lastLogin": Double(1564068005777.0)
};


        2. This user has access to the main tenant  "DBTN" in the group "Owner" and as well has access to subtenants like "TES1" with the code (5678) and group "sub"

...

Code Block
languagejs
titleUser Record Sample
collapsetrue
{
	_id: ObjectId("5d3820639f9655752c03e340"),
	locked: true,
	username: "devop",
	firstName: "FadiAntoine",
	lastName: "NasrHage",
	email: "test@localhost.com",
	status: "active",
	config: {
		allowedTenants: [
			{
				tenant: {
					id: "5c0e74ba9acc3c5a84a51251",
					code: "TES1",
					pin: {
						code: "5678",
						allowed: true
					}
				},
				groups: [
					"sub"
				]
			},
			{
				tenant: {
					code: "TES0",
					id: "5c0e74ba9acc3c5a84a51259"
				}
			},
			{
				tenant: {
					id: "THYME_tID",
					code: "THYME_CODE",
					pin: {
						code: "5677",
						allowed: true
					}
				},
				groups: [
					"waiter"
				]
			},
			{
				tenant: {
					id: "ELVIRA_tID",
					code: "ELVIRA_CODE"
				},
				groups: [
					"manager"
				]
			}
		]
	},
	tenant: {
		id: "5c0e74ba9acc3c5a84a51259",
		code: "DBTN",
		pin: {
			code: "5621",
			allowed: true
		}
	},
	"groups": [
		"owner"
	],
}

...