Skip to content

Commit

Permalink
Merge pull request #35 from franciscogouveia/fix-linting-issues
Browse files Browse the repository at this point in the history
Fix linting issues
  • Loading branch information
franciscogouveia committed Sep 23, 2016
2 parents 2423a50 + 881f485 commit 8f42617
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,7 @@
{
"root": true,
"extends": "hapi",
"rules": {
"no-undef": "error"
}
}
8 changes: 4 additions & 4 deletions lib/index.js
@@ -1,6 +1,5 @@
'use strict';

const Async = require('async');
const Boom = require('boom');
const Joi = require('joi');
const Hoek = require('hoek');
Expand Down Expand Up @@ -59,15 +58,16 @@ schemas.register_options = Joi.object({
});

defaults.options = {
onError: function(request, reply, err) {
onError: (request, reply, err) => {

reply(Boom.wrap(err, 401));
},
responseCode: {
onDeny: 401,
onUndetermined: 401
},
dataRetrievers: []
}
};

exports.register = (server, options, next) => {

Expand All @@ -91,7 +91,7 @@ exports.register = (server, options, next) => {

server.ext('onPostAuth', (request, reply) => {

let config = request.route.settings.plugins.rbac || options.policy;
const config = request.route.settings.plugins.rbac || options.policy;

if (config && config !== CONFIG_NONE) {

Expand Down
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -30,14 +30,15 @@
"node": ">=4.0.0"
},
"dependencies": {
"async": "2.0.1",
"boom": "4.0.0",
"hoek": "4.0.0",
"hoek": "4.1.0",
"joi": "9.0.4",
"rbac-core": "2.0.1"
"rbac-core": "2.0.2"
},
"devDependencies": {
"code": "4.0.0",
"eslint-config-hapi": "^10.0.0",
"eslint-plugin-hapi": "^4.0.0",
"coveralls": "^2.11.9",
"hapi": "15.0.3",
"hapi-auth-basic": "^4.1.0",
Expand Down

0 comments on commit 8f42617

Please sign in to comment.