Class: SystemSettingsMongo
Defined in: auth/src/models/mongo/SystemSettingsMongo.ts:44
Implementation of the SystemSettingsEntity interface for storage in a MongoDB database. If SQL is desired, please use
models.sql.SystemSettingsSQL instead.
Only ever read or written through SystemSettingsUtils with ignoreACL, so the ACL denies everyone.
Deliberately does NOT @RequiresScope requireMFA the way SystemSettings (the response DTO in
models/types.ts) does: RepoUtils applies that same decorator's metadata to every read/write of this
class regardless of caller (SystemSettingsUtils never passes a user), so putting it here would strip
the field from the entity SystemSettingsUtils itself reads back — breaking its own if (settings.requireMFA)
enforcement checks, not just gating an HTTP response. Access control for exposing the field to a caller is
handled once, at the DTO layer, by BaseSettingsRoute.get().
Extends
BaseMongoEntity
Implements
Constructors
Constructor
new SystemSettingsMongo(
other?):SystemSettingsMongo
Defined in: auth/src/models/mongo/SystemSettingsMongo.ts:57
Parameters
other?
Partial<SystemSettingsMongo>
Returns
SystemSettingsMongo
Overrides
BaseMongoEntity.constructor
Properties
_id?
optional_id?:any
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseMongoEntity.d.ts:11
The internal unique identifier used by MongoDB.
Inherited from
BaseMongoEntity._id
allowMultiplePasswords
allowMultiplePasswords:
boolean=false
Defined in: auth/src/models/mongo/SystemSettingsMongo.ts:55
Set to true to let an account have more than one password secret, otherwise (the default) an account can
have only one. With one, a password is the only way in by password, so whoever can change it — its holder, or
an administrator who took it over by resetting it with allowUserChange=false — decides who can sign in that
way. With several, sign-in accepts any of them, which is how an administrator keeps a password of their own
on an account (one its holder can't change) alongside the holder's, to preserve their access to it.
Enforced when a password is created (see BaseSecretRoute.assertPasswordAllowed()); lowering it later
doesn't remove passwords an account already has.
Seeded from and falls back to @Config("auth:allowMultiplePasswords").
Implementation of
SystemSettingsEntity.allowMultiplePasswords
allowRegistration
allowRegistration:
boolean=true
Defined in: auth/src/models/mongo/SystemSettingsMongo.ts:47
Set to true to allow new accounts to be registered, otherwise set to false. When false, new accounts
can only be created by a user with a trusted role.
Seeded from and falls back to @Config("auth:allowRegistration").
Implementation of
SystemSettingsEntity.allowRegistration
dateCreated
dateCreated:
Date
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:18
The date and time that the entity was created.
Implementation of
SystemSettingsEntity.dateCreated
Inherited from
BaseMongoEntity.dateCreated
dateModified
dateModified:
Date
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:22
The date and time that the entity was last modified.
Implementation of
SystemSettingsEntity.dateModified
Inherited from
BaseMongoEntity.dateModified
requireMFA
requireMFA:
boolean=false
Defined in: auth/src/models/mongo/SystemSettingsMongo.ts:51
Set to true to force multi-factor authentication for every account regardless of its own
requireMFA value (see BaseUserRoute.validateCreate/validateUpdate and AuthMFARoute,
which drives MFAStrategyOptions.require2FA from this same flag).
Implementation of
SystemSettingsEntity.requireMFA
uid
uid:
string
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:14
The universally unique identifier of the entity.
Implementation of
Inherited from
BaseMongoEntity.uid
version
version:
number
Defined in: auth/node_modules/@rapidrest/service-core/dist/types/models/BaseEntity.d.ts:26
The optimistic lock version.
Implementation of
Inherited from
BaseMongoEntity.version