This repository was archived by the owner on Jan 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -832,9 +832,12 @@ var GraphQLFactoryACLPlugin = function () {
832
832
try {
833
833
var requiredPerm = _ . get ( this , 'fieldDef._factoryACL' ) ;
834
834
var secret = _ . get ( _this . options , 'secret' ) ;
835
+ var args = resolverArgs . args ,
836
+ info = resolverArgs . info ;
835
837
836
838
// if no jwt secret has been provided authentication is disabled
837
839
// or if not marked as an ACL continue to the next middleware
840
+
838
841
if ( ! requiredPerm || ! secret ) return next ( ) ;
839
842
840
843
// check for system api key
@@ -844,9 +847,6 @@ var GraphQLFactoryACLPlugin = function () {
844
847
// otherwise continue acl check
845
848
var errors = [ ] ;
846
849
var GraphQLError = this . graphql . GraphQLError ;
847
- var args = resolverArgs . args ,
848
- info = resolverArgs . info ;
849
-
850
850
var op = _ . get ( info , 'operation.operation' ) ;
851
851
var userIdField = _ . get ( _this . options , 'userIdField' , 'userId' ) ;
852
852
var schemaName = info . schema . _factory . key ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " graphql-factory-acl" ,
3
- "version" : " 0.1.3 " ,
3
+ "version" : " 0.1.4 " ,
4
4
"description" : " ACL Middleware for GraphQL Factory" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ export default class GraphQLFactoryACLPlugin {
193
193
try {
194
194
const requiredPerm = _ . get ( this , 'fieldDef._factoryACL' )
195
195
const secret = _ . get ( _this . options , 'secret' )
196
+ const { args, info } = resolverArgs
196
197
197
198
// if no jwt secret has been provided authentication is disabled
198
199
// or if not marked as an ACL continue to the next middleware
@@ -205,7 +206,6 @@ export default class GraphQLFactoryACLPlugin {
205
206
// otherwise continue acl check
206
207
const errors = [ ]
207
208
const GraphQLError = this . graphql . GraphQLError
208
- const { args, info } = resolverArgs
209
209
const op = _ . get ( info , 'operation.operation' )
210
210
const userIdField = _ . get ( _this . options , 'userIdField' , 'userId' )
211
211
const schemaName = info . schema . _factory . key
You can’t perform that action at this time.
0 commit comments