@keystonejs/access-control
Advanced tools
Comparing version 6.0.0 to 6.1.0
# @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 @@ |
@@ -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); |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18464
287