Users

A user of learning locker.

It is accessible through the following HTTP interfaces:

For this model the filter (Connection API) and the query (Rest API) parameters will be ignored.
The search parameter should be used instead. The search query parameter is a simple string and will be transformed into filter shown below:

{ "$or": [ { "name": { "$regex": "exampleSearchString", "$options": "i" } }, { "email": { "$regex": "exampleSearchString", "$options": "i" } } ] }

SCHEMA

Name

Description

Name

Description

_id

The id of this user.

name

Name of the user.

email

The email of the user.

organisations

A list of organisation ids that this user belongs to.

organisationSettings

A list of organisation settings for this user

imageUrl

A url of an image for this user.

googleId

The user’s google id.

ownerOrganisation

The id of the users owning organisation

ownerOrganisationSettings

Duplication of organisation settings.

settings

An object of specific users settings. see settings

scopes

Global scopes for this user.

verified

Whether this user has been verified.

resetTokens

A list of reset tokens. See reset token.

passwordHistory

A list of users previously used password hashes.

authLastAttempt

When the user last attempted to authenticate.

authFailedAttempts

Number of failed authentication attempts.

authLockoutExpiry

When the user can attempt to authenticate again.

ORGANISATION SETTINGS

A list of organisation settings:

Name

Description

Name

Description

organisation

The id of the organisation of these settings.

scopes

List of scopes that this user has permissions for in this organisation.

roles

List of role ids that this user has permissions for in the organisation.

filter

statement filter which restricts which statements this user has access too.

SETTINGS

Name

Description

Name

Description

CONFIRM_BEFORE_DELETE

If true, will prompt user before delete actions.

RESET TOKEN

A token which is used to reset a user’s password.

Name

Description

Name

Description

token

The token.

expires

When this token expires.

EXAMPLE MODEL

{ "_id" : "59c2371c16bc715f83c34501", "createdAt" : "2017-09-19T12:07:25.536Z", "updatedAt" : "2017-09-19T15:06:54.027Z", "email" : "example@example.org", "password" : "aaa", "authLockoutExpiry" : null, "authFailedAttempts" : 0, "authLastAttempt" : "2017-09-19T15:06:54.020Z", "passwordHistory" : [ { "date" : "2017-09-19T12:07:25.505Z", "hash" : "aaa", "_id" : "59c2371c16bc715f83c34502" }, { "date" : "2017-09-19T12:47:34.093Z", "hash" : "bbb", "_id" : "59c2371c16bc715f83c34503" } ], "resetTokens" : [ ], "verified" : true, "scopes" : [ "site_admin" ], "settings" : { "CONFIRM_BEFORE_DELETE" : true }, "ownerOrganisationSettings" : { "PASSWORD_CUSTOM_MESSAGE" : null, "PASSWORD_CUSTOM_REGEX" : null, "PASSWORD_USE_CUSTOM_REGEX" : false, "PASSWORD_REQUIRE_NUMBER" : true, "PASSWORD_REQUIRE_ALPHA" : true, "PASSWORD_MIN_LENGTH" : 8, "PASSWORD_HISTORY_TOTAL" : 3, "PASSWORD_HISTORY_CHECK" : true, "LOCKOUT_SECONDS" : 1800, "LOCKOUT_ATTEMPS" : 5, "LOCKOUT_ENABLED" : true }, "organisationSettings" : [ { "organisation" : "59c2371c16bc715f83c34504", "_id" : "59c2371c16bc715f83c34505", "filter" : "{}", "roles" : [ ], "scopes" : [ "all" ] } ], "organisations" : [ "59c2371c16bc715f83c34504", "59c2371c16bc715f83c34506", "59c2371c16bc715f83c34507" ], "ownerOrganisation" : "59c2371c16bc715f83c34504" }

 

Learning Locker and the Squirrel logo are trademark of Learning Pool 2020 | Learning Locker is licensed under GPL 3.0.