Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@keystonejs/access-control

Package Overview
Dependencies
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keystonejs/access-control - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

6

CHANGELOG.md
# @keystonejs/access-control
## 6.1.0
### Minor Changes
- [`463f55233`](https://github.com/keystonejs/keystone/commit/463f552335013d5ba9ebf2e8f7a9ebf8e2b0e0db) [#3095](https://github.com/keystonejs/keystone/pull/3095) Thanks [@timleslie](https://github.com/timleslie)! - Added `{ item, args, context, info, gqlName }` to the arguments available in access control functions for custom queries/mutations.
## 6.0.0

@@ -4,0 +10,0 @@

19

lib/access-control.js

@@ -154,3 +154,11 @@ const { getType, pick, defaultObj, intersection } = require('@keystonejs/utils');

async validateCustomAccessControl({ access, authentication = {} }) {
async validateCustomAccessControl({
item,
args,
context,
info,
access,
authentication = {},
gqlName,
}) {
// Either a boolean or an object describing a where clause

@@ -161,3 +169,10 @@ let result;

} else {
result = await access({ authentication: authentication.item ? authentication : {} });
result = await access({
item,
args,
context,
info,
authentication: authentication.item ? authentication : {},
gqlName,
});
}

@@ -164,0 +179,0 @@ const type = getType(result);

2

package.json
{
"name": "@keystonejs/access-control",
"description": "KeystoneJS Access Control parsing and validating utilities.",
"version": "6.0.0",
"version": "6.1.0",
"author": "The KeystoneJS Development Team",

@@ -6,0 +6,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc