overrideAccess runs the collection’s access rules for the user (or req.user) it’s given, or for an anonymous user when it has none.
Skipping Access Control
Trusted server work, such as scripts, seeds, jobs and system hooks, can skip access control withoverrideAccess: true.
For example:
Respecting Access Control
Local API calls run access control unlessoverrideAccess: true is passed. To act for a signed-in user, pass the user (or a req that carries it) with overrideAccess: false; to skip access for trusted server work, pass overrideAccess: true. Pass it explicitly either way, so each call says which it is.
overrideAccess: false: access control runs with the current user’s permissions. This is the default, but say it explicitly.user: the user access is checked against. Without one, the call runs as an anonymous user.
user we passed has the appropriate access control permissions.