How to use the @keystonejs/access-control.parseFieldAccess function in @keystonejs/access-control

To help you get started, we’ve selected a few @keystonejs/access-control 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 keystonejs / keystone / packages / fields / src / types / Virtual / Implementation.js View on Github external
parseFieldAccess(args) {
    const parsedAccess = parseFieldAccess(args);
    const fieldDefaults = { create: false, update: false, delete: false };
    return Object.keys(parsedAccess).reduce((prev, schemaName) => {
      prev[schemaName] = { ...fieldDefaults, read: parsedAccess[schemaName].read };
      return prev;
    }, {});
  }
}
github keystonejs / keystone / packages / fields / src / Implementation.js View on Github external
parseFieldAccess(args) {
    return parseFieldAccess(args);
  }

@keystonejs/access-control

KeystoneJS Access Control parsing and validating utilities.

MIT
Latest version published 3 years ago

Package Health Score

63 / 100
Full package analysis