Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@keystonejs/access-control

keystonejs1.7kMIT7.1.2TypeScript support: included

KeystoneJS Access Control parsing and validating utilities.

readme

Access Control

This is the last active development release of this package as Keystone 5 is now in a 6 to 12 month active maintenance phase. For more information please read our Keystone 5 and beyond post.

View changelog

This package is an internal helper package used by Keystone to parse and validate access control expressions.

You should probably not use this directly in your Keystone projects.

For more information on how to configure access control for you Keystone application, please consult the Access Control Guide.

changelog

@keystonejs/access-control

7.1.2

Patch Changes

7.1.1

Patch Changes

7.1.0

Minor Changes

Patch Changes

7.0.1

Patch Changes

7.0.0

Major Changes

6.3.2

Patch Changes

6.3.1

Patch Changes

6.3.0

Minor Changes

  • 5a3849806 #3262 Thanks @MadeByMike! - Added a new private internal schema that will allow a better method of bypassing access control on the executeGraphQL function.

    The schema name internal is now a reserved name and if you have a schema with this name you will need to change it with this update.

    Note: You cannot change access control on the internal schema.

6.2.0

Minor Changes

6.1.0

Minor Changes

  • 463f55233 #3095 Thanks @timleslie! - Added { item, args, context, info, gqlName } to the arguments available in access control functions for custom queries/mutations.

6.0.0

Major Changes

  • 839666e25 #2872 Thanks @wcalebgray! - Added async capability for all Access Control resolvers. This changes the below methods to async functions, returning Promises:

    access-control
    - validateCustomAccessControl
    - validateListAccessControl
    - validateFieldAccessControl
    - validateAuthAccessControl
    
    keystone/List
    - checkFieldAccess
    - checkListAccess
    
    keystone/providers/custom
    - computeAccess
    
    keystone/providers/listAuth
    - checkAccess
    

    Changed keystone/Keystone's getGraphQlContext return object (context) to include async resolvers for the following methods:

    - context.getCustomAccessControlForUser
    - context.getListAccessControlForUser
    - context.getFieldAccessControlForUser
    - context.getAuthAccessControlForUser

5.2.0

Minor Changes

  • 42497b8e #2456 Thanks @timleslie! - Added validateAuthAccessControl as a special case for validating access control on authentication queries and mutations.

Patch Changes

5.1.0

Minor Changes

Patch Changes

5.0.0

Major Changes

  • 7b4ed362 #1821 Thanks @jesstelford! - Release @keystonejs/* packages (つ^ ◡ ^)つ

    • This is the first release of @keystonejs/* packages (previously @keystone-alpha/*).
    • All packages in the @keystone-alpha namespace are now available in the @keystonejs namespace, starting at version 5.0.0.
    • To upgrade your project you must update any @keystone-alpha/* dependencies in package.json to point to "@keystonejs/*": "^5.0.0" and update any require/import statements in your code.

Patch Changes

@keystone-alpha/access-control

3.1.0

Minor Changes

  • 1405eb07: Add listKey, fieldKey (fields only), operation, gqlName, itemId and itemIds as arguments to imperative access control functions.

3.0.0

Major Changes

  • 9ade2b2d: Add support for access: { auth: ... } which controls whether authentication queries and mutations are accessible on a List

    If you have a List which is being used as the target of an Authentication Strategy, you should set access: { auth: true } on that list.

Minor Changes

  • b61289b4: Add parseCustomAccess() for parsing the access control directives on custom types/queries/mutations.
  • 0bba9f07: Add validateCustomAccessControl() for use by custom queries/mutations access control checking.

Patch Changes

  • 9ece715c: Refactor access-control internals to better support future changes

2.0.0

Major Changes

  • bc0b9813: parseListAccess and parseFieldAccess now take schemaNames as an argument, and return a nested access object, with the schemaNames as keys.

    For example,

    parseListAccess({ defaultAccess: false, access: { public: true }, schemaNames: ['public', 'private'] }

    will return

    {
      public: { create: true, read: true, update: true, delete: true },
      private: { create: false, read: false, update: false, delete: false },
    }

    These changes are backwards compatible with regard to the access argument, so

    const access = { create: true, read: true, update: true, delete: true };
    parseListAccess({ access, schemaNames: ['public', 'private'] }

    will return

    {
      public: { create: true, read: true, update: true, delete: true },
      private: { create: true, read: true, update: true, delete: true },
    }

1.1.0

Minor Changes

  • e5d4ee76: Expose 'originalInput' to access control functions for lists & fields

1.0.5

Patch Changes

  • 19fe6c1b:

    Move frontmatter in docs into comments

1.0.4

1.0.3

  • [patch]10d96db2:

    • Restructure internal code

1.0.2

1.0.1

  • [patch]1f0bc236:

    • Update the package.json author field to "The Keystone Development Team"
  • [patch]9534f98f:

    • Add README.md to package

1.0.0

  • [major] 8b6734ae:

    • This is the first release of keystone-alpha (previously voussoir). All packages in the @voussoir namespace are now available in the @keystone-alpha namespace, starting at version 1.0.0. To upgrade your project you must update any @voussoir/<foo> dependencies in package.json to point to @keystone-alpha/<foo>: "^1.0.0" and update any require/import statements in your code.

@voussoir/access-control

0.4.2

  • [patch] 113e16d4:

    • Remove unused dependencies

0.4.1

  • Updated dependencies [723371a0]:
  • Updated dependencies [aca26f71]:
  • Updated dependencies [a3d5454d]:

0.4.0

  • [minor] ffc98ac4:

    • Rename the access control function parameter item to existingItem

0.3.0

  • [minor] 3ae588b7:

    • Rename testAccessControl functions to validateAccessControl

0.2.0

  • [minor] 47c7dcf6" :

    • Bump all packages with a minor version to set a new baseline

0.1.3

0.1.2

  • [patch] Rename readme files a8b995e

0.1.1

  • [patch] Remove tests and markdown from npm dc3ee7d