-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathPolicy.php
79 lines (70 loc) · 1.7 KB
/
Policy.php
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
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
namespace Ibexa\Contracts\Core\Persistence\User;
use Ibexa\Contracts\Core\Persistence\ValueObject;
class Policy extends ValueObject
{
/**
* ID of the policy.
*
* @var mixed
*/
public $id;
/**
* Foreign ID of the role.
*
* @var mixed
*/
public $roleId;
/**
* Only used when the role's status, current policy belongs to, is Role::STATUS_DRAFT.
* Original policy ID the draft was created from.
* In other cases, will be null.
*
* @since 6.0
*
* @var int|null
*/
public $originalId;
/**
* Name of module, associated with the Policy.
*
* Eg: content
*
* @var string
*/
public $module;
/**
* Name of the module function Or all functions with '*'.
*
* Eg: read
*
* @var string
*/
public $function;
/**
* Array of policy limitations, which is just a random hash map.
*
* The limitation array may look like:
* <code>
* array(
* 'Subtree' => array(
* '/1/2/',
* '/1/4/',
* ),
* 'Foo' => array( 'Bar' ),
* …
* )
* </code>
*
* Where the keys are the limitation identifiers, and the respective values
* are an array of limitation values
*
* @var array|string If string, then only the value '*' is allowed, meaning all limitations.
* Can not be a empty array as '*' should be used in this case.
*/
public $limitations;
}