Model users
Permissions
User Group | Create? | Read? | Update? | Delete? |
---|
admin | x | x | x | x |
owner | | x | x | |
user | | x | | |
member | | x | | |
api | | x | | |
Fields
Name | Type | Link | Maps To | Default | Indexed? | Unique? |
---|
__v | Number | | | | | |
_deleted | Boolean | | | false | x | |
_id | ObjectID | | | function defaultId() {
return new oid();
} | | |
_owner_id | ObjectID | User | _owner | | x | |
_updated_by_id | ObjectID | User | _updated_by | | x | |
about | String | | | | | |
admin | Boolean | | | | | |
card | String | | | | | |
checked_in | Boolean | | | false | x | |
checkin_id | ObjectID | Checkin | | | | |
clay_access_group_ids | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
clay_id | String | | | | | |
claytag_id | ObjectID | Claytag | | | | |
createdAt | Date | | | | | |
date_created | Date | | | function now() { [native code] } | | |
email | String | | | | x | x |
emails | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
facebook | Mixed | | | | | |
first_login | Boolean | | | true | | |
google | Mixed | | | | | |
hidden | Boolean | | | false | x | |
id_number | String | | | | | |
img | String | | | /avatars/grey_avatar_1.png | | |
last_checkin | Date | | | | | |
last_checkin_location_id | ObjectID | Location | last_checkin_location | | | |
last_login | Date | | | | | |
linkedin | Mixed | | | | | |
location_id | ObjectID | Location | | | x | |
membership_id | ObjectID | Membership | | | x | |
mobile | String | | | | | |
name | String | | | | x | |
newsletter | Boolean | | | | | |
offboard_date | Date | | | | | |
onboard_date | Date | | | | | |
onboarded | Boolean | | | false | | |
organisation_id | ObjectID | Organisation | | | x | |
papercut_username | String | | | | | |
password | String | | | | | |
pin | String | | | | | |
position | String | | | | | |
presence | Boolean | | | true | x | |
radius_id | Number | | | | | |
referal_method | String | | | | | |
referee | String | | | | | |
skype | String | | | | | |
slack_name | String | | | | | |
space_id | ObjectID | Space | | | x | |
start_date | Date | | | function now() { [native code] } | | |
status | String | | | inactive | x | |
tag_id | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
temp_hash | String | | | | | |
timezone | String | | | | | |
twitter | Mixed | | | | | |
unikey_pin | String | | | | | |
updatedAt | Date | | | | | |
url | String | | | | | |
urlid | String | | | | x | |
user_printing | Boolean | | | false | | |
vehicle_registration_numbers | Array | | | function() {
// Leave it up to `cast()` to convert the array
return fn
? defaultArr.call(this)
: defaultArr != null
? [].concat(defaultArr)
: [];
} | | |
xero_id | String | | | | | |
Raw definition
{
"path": "__v",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"__v"
],
"options": {},
"_index": null
}
{
"path": "_deleted",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_deleted"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"path": "_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"_id"
],
"options": {
"auto": true,
"type": "ObjectId"
},
"_index": null
}
{
"path": "_owner_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_owner_id"
],
"options": {
"link": "User",
"map_to": "_owner",
"index": true
},
"_index": true
}
{
"path": "_updated_by_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"_updated_by_id"
],
"options": {
"link": "User",
"map_to": "_updated_by",
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "about",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"about"
],
"options": {},
"_index": null
}
{
"path": "admin",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"admin"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "card",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"card"
],
"options": {},
"_index": null
}
{
"path": "checked_in",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"checked_in"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"path": "checkin_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"checkin_id"
],
"options": {
"link": "Checkin"
},
"_index": null
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"member": "r",
"api": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"all": "",
"member": "r",
"api": "r"
},
"pluralization": true
},
"caster": {
"path": "clay_access_group_ids",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"clay_access_group_ids"
],
"options": {
"link": "Clayaccessgroup"
},
"_index": null,
"_arrayPath": "clay_access_group_ids.$",
"_arrayParentPath": "clay_access_group_ids"
},
"$embeddedSchemaType": {
"path": "clay_access_group_ids",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"clay_access_group_ids"
],
"options": {
"link": "Clayaccessgroup"
},
"_index": null,
"_arrayPath": "clay_access_group_ids.$",
"_arrayParentPath": "clay_access_group_ids"
},
"$isMongooseArray": true,
"path": "clay_access_group_ids",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"clay_access_group_ids"
],
"options": {
"type": [
{
"link": "Clayaccessgroup"
}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "clay_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"clay_id"
],
"options": {},
"_index": null
}
{
"path": "claytag_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"claytag_id"
],
"options": {
"link": "Claytag"
},
"_index": null
}
{
"path": "createdAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [
null,
null
],
"_presplitPath": [
"createdAt"
],
"options": {
"immutable": true
},
"_index": null,
"$immutable": true
}
{
"path": "date_created",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"date_created"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "email",
"instance": "String",
"validators": [
{
"message": "Please use a valid email address",
"type": "user defined"
}
],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"email"
],
"options": {
"unique": true,
"index": true,
"validate": [
null,
"Please use a valid email address"
]
},
"_index": {
"unique": true,
"background": true
}
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"member": "r",
"api": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"all": "",
"member": "r",
"api": "r"
},
"pluralization": true
},
"caster": {
"enumValues": [],
"regExp": null,
"path": "emails",
"instance": "String",
"validators": [
{
"message": "Please use a valid email address",
"type": "user defined"
}
],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"emails"
],
"options": {
"validate": [
null,
"Please use a valid email address"
]
},
"_index": null,
"_arrayPath": "emails.$",
"_arrayParentPath": "emails"
},
"$embeddedSchemaType": {
"enumValues": [],
"regExp": null,
"path": "emails",
"instance": "String",
"validators": [
{
"message": "Please use a valid email address",
"type": "user defined"
}
],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"emails"
],
"options": {
"validate": [
null,
"Please use a valid email address"
]
},
"_index": null,
"_arrayPath": "emails.$",
"_arrayParentPath": "emails"
},
"$isMongooseArray": true,
"path": "emails",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"emails"
],
"options": {
"type": [
{
"validate": [
null,
"Please use a valid email address"
]
}
]
},
"_index": null
}
{
"path": "facebook",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"facebook"
],
"options": {},
"_index": null
}
{
"path": "first_login",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"first_login"
],
"options": {
"default": true
},
"_index": null,
"defaultValue": true
}
{
"path": "google",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"google"
],
"options": {},
"_index": null
}
{
"path": "hidden",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"hidden"
],
"options": {
"default": false,
"index": true
},
"_index": true,
"defaultValue": false
}
{
"enumValues": [],
"regExp": null,
"path": "id_number",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"id_number"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "img",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"img"
],
"options": {
"default": "/avatars/grey_avatar_1.png"
},
"_index": null,
"defaultValue": "/avatars/grey_avatar_1.png"
}
{
"path": "last_checkin",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"last_checkin"
],
"options": {},
"_index": null
}
{
"path": "last_checkin_location_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"last_checkin_location_id"
],
"options": {
"link": "Location",
"map_to": "last_checkin_location"
},
"_index": null
}
{
"path": "last_login",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"last_login"
],
"options": {},
"_index": null
}
{
"path": "linkedin",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"linkedin"
],
"options": {},
"_index": null
}
{
"path": "location_id",
"instance": "ObjectID",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"location_id"
],
"options": {
"link": "Location",
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true
}
{
"path": "membership_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"membership_id"
],
"options": {
"link": "Membership",
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "mobile",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"mobile"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "name",
"instance": "String",
"validators": [
{
"message": "Path `{PATH}` is required.",
"type": "required"
},
{
"message": "Name cannot be empty",
"type": "user defined"
}
],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"name"
],
"options": {
"required": true,
"index": true
},
"_index": true,
"isRequired": true,
"originalRequiredValue": true
}
{
"path": "newsletter",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"newsletter"
],
"options": {},
"_index": null
}
{
"path": "offboard_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"offboard_date"
],
"options": {},
"_index": null
}
{
"path": "onboard_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"onboard_date"
],
"options": {},
"_index": null
}
{
"path": "onboarded",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"onboarded"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"path": "organisation_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"organisation_id"
],
"options": {
"link": "Organisation",
"index": true
},
"_index": true
}
{
"enumValues": [],
"regExp": null,
"path": "papercut_username",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"papercut_username"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "password",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"password"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "pin",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"pin"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "position",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"position"
],
"options": {},
"_index": null
}
{
"path": "presence",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"presence"
],
"options": {
"default": true,
"index": true
},
"_index": true,
"defaultValue": true
}
{
"path": "radius_id",
"instance": "Number",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"radius_id"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "referal_method",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"referal_method"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "referee",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"referee"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "skype",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"skype"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "slack_name",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"slack_name"
],
"options": {},
"_index": null
}
{
"path": "space_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"space_id"
],
"options": {
"link": "Space",
"index": true
},
"_index": true
}
{
"path": "start_date",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"start_date"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "status",
"instance": "String",
"validators": [
{
"message": "Validator failed for path `{PATH}` with value `{VALUE}`",
"type": "user defined",
"validator": {}
}
],
"getters": [],
"setters": [],
"_presplitPath": [
"status"
],
"options": {
"validate": {},
"index": true,
"default": "inactive"
},
"_index": true,
"defaultValue": "inactive"
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"member": "r",
"api": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"all": "",
"member": "r",
"api": "r"
},
"pluralization": true
},
"caster": {
"path": "tag_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"tag_id"
],
"options": {
"link": "Tag"
},
"_index": null,
"_arrayPath": "tag_id.$",
"_arrayParentPath": "tag_id"
},
"$embeddedSchemaType": {
"path": "tag_id",
"instance": "ObjectID",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"tag_id"
],
"options": {
"link": "Tag"
},
"_index": null,
"_arrayPath": "tag_id.$",
"_arrayParentPath": "tag_id"
},
"$isMongooseArray": true,
"path": "tag_id",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"tag_id"
],
"options": {
"type": [
{
"link": "Tag"
}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "temp_hash",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"temp_hash"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "timezone",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"timezone"
],
"options": {},
"_index": null
}
{
"path": "twitter",
"instance": "Mixed",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"twitter"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "unikey_pin",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"unikey_pin"
],
"options": {},
"_index": null
}
{
"path": "updatedAt",
"instance": "Date",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"updatedAt"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "url",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"url"
],
"options": {},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "urlid",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"urlid"
],
"options": {
"index": {
"unique": true
}
},
"_index": {
"unique": true,
"background": true
}
}
{
"path": "user_printing",
"instance": "Boolean",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"user_printing"
],
"options": {
"default": false
},
"_index": null,
"defaultValue": false
}
{
"schemaOptions": {
"timestamps": true,
"toJSON": {
"virtuals": true
},
"toObject": {
"virtuals": true
},
"perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"member": "r",
"api": "r"
},
"typeKey": "type",
"id": true,
"_id": true,
"validateBeforeSave": true,
"read": null,
"shardKey": null,
"discriminatorKey": "__t",
"autoIndex": null,
"minimize": true,
"optimisticConcurrency": false,
"versionKey": "__v",
"capped": false,
"bufferCommands": true,
"strictQuery": true,
"strict": true,
"_perms": {
"admin": "crud",
"owner": "ru",
"user": "r",
"all": "",
"member": "r",
"api": "r"
},
"pluralization": true
},
"caster": {
"enumValues": [],
"regExp": null,
"path": "vehicle_registration_numbers",
"instance": "String",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"vehicle_registration_numbers"
],
"options": {},
"_index": null,
"_arrayPath": "vehicle_registration_numbers.$",
"_arrayParentPath": "vehicle_registration_numbers"
},
"$embeddedSchemaType": {
"enumValues": [],
"regExp": null,
"path": "vehicle_registration_numbers",
"instance": "String",
"validators": [],
"getters": [],
"setters": [
null
],
"_presplitPath": [
"vehicle_registration_numbers"
],
"options": {},
"_index": null,
"_arrayPath": "vehicle_registration_numbers.$",
"_arrayParentPath": "vehicle_registration_numbers"
},
"$isMongooseArray": true,
"path": "vehicle_registration_numbers",
"instance": "Array",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"vehicle_registration_numbers"
],
"options": {
"type": [
{}
]
},
"_index": null
}
{
"enumValues": [],
"regExp": null,
"path": "xero_id",
"instance": "String",
"validators": [],
"getters": [],
"setters": [],
"_presplitPath": [
"xero_id"
],
"options": {},
"_index": null
}