Issues (2882)

src/Security/InheritedPermissionsExtension.php (3 issues)

Severity
1
<?php
2
3
namespace SilverStripe\Security;
4
5
use SilverStripe\ORM\DataExtension;
6
use SilverStripe\ORM\ManyManyList;
7
8
/**
9
 * Provides standard permission fields for inheritable permissions
10
 *
11
 * @property string $CanViewType
12
 * @property string $CanEditType
13
 * @method ManyManyList ViewerGroups()
14
 * @method ManyManyList EditorGroups()
15
 */
16
class InheritedPermissionsExtension extends DataExtension
17
{
18
    private static $db = [
0 ignored issues
show
The private property $db is not used, and could be removed.
Loading history...
19
        'CanViewType' => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
20
        'CanEditType' => "Enum('LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
21
    ];
22
23
    private static $many_many = [
0 ignored issues
show
The private property $many_many is not used, and could be removed.
Loading history...
24
        'ViewerGroups' => Group::class,
25
        'EditorGroups' => Group::class,
26
    ];
27
28
    private static $defaults = [
0 ignored issues
show
The private property $defaults is not used, and could be removed.
Loading history...
29
        'CanViewType' => InheritedPermissions::INHERIT,
30
        'CanEditType' => InheritedPermissions::INHERIT,
31
    ];
32
}
33