refactor forceToBeAuthenticated to forceToBeMaster

This commit is contained in:
Eneko Lakasta 2018-06-05 13:16:36 +02:00
parent 0207b67d5f
commit da08e42921

View File

@ -1,7 +1,7 @@
const AuthApi = require('../auth/auth_api');
const basicAuth = require('basic-auth');
module.exports = function authorization (metadataBackend, forceToBeAuthenticated = false) {
module.exports = function authorization (metadataBackend, forceToBeMaster = false) {
return function authorizationMiddleware (req, res, next) {
const { user } = res.locals;
const credentials = getCredentialsFromRequest(req);