1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00
unleash.unleash/src/test/fixtures/permissions.ts
2021-09-14 19:30:11 +02:00

18 lines
409 B
TypeScript

const adminUser = (): { hook: (app: any) => void } => {
return {
hook(app) {
app.use((req, res, next) => {
req.user = {
isAPI: true,
id: 1,
email: 'unknown',
permissions: ['ADMIN'],
};
next();
});
},
};
};
export default adminUser;