1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/test/fixtures/permissions.ts

18 lines
409 B
TypeScript
Raw Normal View History

2021-09-14 19:30:11 +02:00
const adminUser = (): { hook: (app: any) => void } => {
return {
hook(app) {
app.use((req, res, next) => {
req.user = {
isAPI: true,
id: 1,
email: 'unknown',
2021-09-14 19:30:11 +02:00
permissions: ['ADMIN'],
};
next();
});
},
};
};
2021-09-14 19:30:11 +02:00
export default adminUser;