-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPermissionRepositoryInterface.php
More file actions
67 lines (54 loc) · 1.79 KB
/
Copy pathPermissionRepositoryInterface.php
File metadata and controls
67 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
declare(strict_types=1);
namespace Alchemy\AclBundle\Repository;
use Alchemy\AclBundle\Model\AccessControlEntryInterface;
interface PermissionRepositoryInterface
{
/**
* @return AccessControlEntryInterface[]
*/
public function findAcesByParams(array $params = []): array;
public function deleteAcesByParams(array $params = []): void;
public function getAces(string $userId, array $groupIds, string $objectType, ?string $objectId): array;
public function getAllowedUserIds(string $objectType, string $objectId, int $permission): array;
public function getAllowedGroupIds(string $objectType, string $objectId, int $permission): array;
/**
* @return AccessControlEntryInterface[]
*/
public function getObjectAces(string $objectType, ?string $objectId): array;
public function findAce(
int $userType,
?string $userId,
string $objectType,
string $objectId,
?string $parentId = null,
): ?AccessControlEntryInterface;
public function findAces(
int $userType,
?string $userId,
string $objectType,
string $objectId,
): array;
public function updateOrCreateAce(
int $userType,
string $userId,
string $objectType,
?string $objectId,
int $mask,
array $metadata = [],
?string $parentId = null,
bool $append = false,
?AccessControlEntryInterface &$previousAce = null,
): AccessControlEntryInterface;
/**
* @return bool Whether the ACE has been deleted
*/
public function deleteAce(
int $userType,
string $userId,
string $objectType,
?string $objectId,
?string $parentId = null,
?AccessControlEntryInterface &$previousAce = null,
): bool;
}