How to use the @casl/ability/extra.rulesToQuery function in @casl/ability

To help you get started, we’ve selected a few @casl/ability examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stalniy / casl / packages / casl-mongoose / src / mongo.js View on Github external
export function toMongoQuery(ability, subject, action = 'read') {
  return rulesToQuery(ability, action, subject, convertToMongoQuery);
}

@casl/ability

CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access

MIT
Latest version published 14 days ago

Package Health Score

88 / 100
Full package analysis