aswi20220x00-gitlab/webapp/components/types/Auth.ts @ 4bc99591
1 | 8c45ccb0 | hrubyjar | import { AppProps } from 'next/app'; |
---|---|---|---|
2 | import { ERole } from '../../api'; |
||
3 | |||
4 | export type SecuredComponent = AppProps['Component'] & { |
||
5 | auth: ComponentAuth; |
||
6 | };
|
||
7 | |||
8 | export class ComponentAuth { |
||
9 | minRole: ERole | null; |
||
10 | |||
11 | constructor(minRole: ERole | null = null) { |
||
12 | this.minRole = minRole; |
||
13 | }
|
||
14 | }
|