From 7bb4ca4f4521221efdff780b9facd710e0536711 Mon Sep 17 00:00:00 2001 From: FilipDusek Date: Sat, 27 May 2017 10:20:56 +0200 Subject: [PATCH] Default role issue Fixes a typo causing default role not to be applied --- lib/nacl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nacl.js b/lib/nacl.js index 1f0d4d5..7672afd 100644 --- a/lib/nacl.js +++ b/lib/nacl.js @@ -23,7 +23,7 @@ function config(config, response) { opt.response = response; opt.baseUrl = options.baseUrl; opt.decodedObjectName = options.decodedObjectName; - opt.defautRole = options.defautRole || 'guest'; + opt.defaultRole = options.defautRole || 'guest'; if (options.rules) { opt.rules = utils.validate(options.rules); @@ -70,7 +70,7 @@ function authorize(req, res, next) { * @type {[type]} */ - let role = helper.getRole(req, res, opt.decodedObjectName, opt.defautRole); + let role = helper.getRole(req, res, opt.decodedObjectName, opt.defaultRole); if (!_.isString(role) || !role) return;