1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-23 20:07:40 +02:00
unleash.unleash/src/test/fixtures/permissions.js

19 lines
393 B
JavaScript
Raw Normal View History

'use strict';
module.exports = () => {
const _perms = ['ADMIN'];
return {
hook(app) {
app.use((req, res, next) => {
req.user = {
isAPI: true,
id: 1,
email: 'unknown',
permissions: _perms,
};
next();
});
},
};
};