Skip to content

Options

Global Options

Global options can be passed on to the express-mongoose-acl object itself.

  • globalPermissions: see Quick Start - Global Permissions
  • permissionField: the global permission field name, default to _permissions
  • idParam: the name of Route parameter that is used to capture the document ID, default to id

Model Router Options

Router options can be passed on to the instance constructor or to the each setter methods.

userRouter.identifier(function (id) {
  return { $or: [{ _id: id }, { code: id }] };
});