1 | <?php |
||
17 | class Owner |
||
18 | { |
||
19 | /** @var string $resource */ |
||
20 | protected $resource; |
||
21 | |||
22 | /** |
||
23 | * Constructor |
||
24 | * |
||
25 | * @param string $resource What is granted permission to |
||
26 | */ |
||
27 | public function __construct(string $resource) |
||
31 | |||
32 | /** |
||
33 | * Check if allowed i.e. user matches. |
||
34 | * |
||
35 | * @param string $resource Resource to check |
||
36 | * @param ForumsUserInterface $CurrentUser CurrentUser |
||
37 | * @param ForumsUserInterface $user Owner of the resource |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function check(string $resource, ForumsUserInterface $CurrentUser, ForumsUserInterface $user): bool |
||
48 | } |
||
49 |