Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #77 from FilipDusek/DefaultRole-Patch
Browse files Browse the repository at this point in the history
Issue with default role not being used
  • Loading branch information
nyambati authored Jun 5, 2017
2 parents 9661e93 + a0bc0e3 commit bf87d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nacl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.defaultRole || 'guest';

if (options.rules) {
opt.rules = utils.validate(options.rules);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit bf87d22

Please sign in to comment.