Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class ACFMiddleware extends BaseAccessControlMiddleware |
||
12 | { |
||
13 | public string $level_field; |
||
14 | |||
15 | public const CIRCOLO = 1; |
||
16 | public const FEDERAZIONE = 2; |
||
17 | public const REGIONALE = 4; |
||
18 | public const NAZIONALE = 8; |
||
19 | |||
20 | |||
21 | |||
22 | protected function handle(mixed ...$middlewareParams): HttpResponse|Request |
||
23 | { |
||
24 | $this->level_field = $middlewareParams["level_field"] ?? "level"; |
||
25 | |||
26 | return parent::handle(...$middlewareParams); |
||
27 | } |
||
28 | |||
29 | |||
30 | protected function checkPermissions(string $modifier, mixed ...$params): bool |
||
50 | } |
||
51 | } |
||
52 |