refactor forceToBeAuthenticated to forceToBeMaster
This commit is contained in:
parent
0207b67d5f
commit
da08e42921
@ -1,7 +1,7 @@
|
|||||||
const AuthApi = require('../auth/auth_api');
|
const AuthApi = require('../auth/auth_api');
|
||||||
const basicAuth = require('basic-auth');
|
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) {
|
return function authorizationMiddleware (req, res, next) {
|
||||||
const { user } = res.locals;
|
const { user } = res.locals;
|
||||||
const credentials = getCredentialsFromRequest(req);
|
const credentials = getCredentialsFromRequest(req);
|
||||||
|
Loading…
Reference in New Issue
Block a user