Skip to content

Interface: RbacModelOptions ​

Defined in: packages/mongoose/src/models.ts:54

Properties ​

PropertyTypeDescriptionDefined in
connection?ConnectionConnection to register the models on. Default: the default mongoose.connection.packages/mongoose/src/models.ts:56
expiry?booleanmongooseAdapter() only: store an expiry per role assignment and direct permission (assignRole(role, { expiresAt })), in the expiresAt field of the link documents. Default: false: the adapter never reads or writes that field. MongoDB needs no migration either way.packages/mongoose/src/models.ts:64
prefix?stringPrepended to every collection name, e.g. 'rbac_' → rbac_permissions. Default: ''.packages/mongoose/src/models.ts:58

Released under the MIT License. Inspired by spatie/laravel-permission.