Ghost/core/server/web/shared/middlewares/labs.js
Fabien 'egg' O'Carroll 73f6fd8c51
Enabled Members for all sites (#12582)
no-issue

This removes all references to the members labs setting, any code that was run conditionally behind this flag now runs unconditionally. 

* Removed usage of Members labs flag
* Removed tests for Members disabled
* Added dynamic keypair generation for when setting is missing
2021-02-02 16:12:53 +00:00

13 lines
299 B
JavaScript

const errors = require('@tryghost/errors');
const labsUtil = require('../../../services/labs');
const labs = flag => (req, res, next) => {
if (labsUtil.isSet(flag) === true) {
return next();
} else {
return next(new errors.NotFoundError());
}
};
module.exports = labs;