1 | <?php |
||
19 | class LDAPGroupExtension extends DataExtension |
||
20 | { |
||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private static $db = [ |
||
|
|||
25 | // Unique user identifier, same field is used by SAMLMemberExtension |
||
26 | 'GUID' => 'Varchar(50)', |
||
27 | 'DN' => 'Text', |
||
28 | 'LastSynced' => 'DBDatetime' |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * A SilverStripe group can have several mappings to LDAP groups. |
||
33 | * @var array |
||
34 | */ |
||
35 | private static $has_many = [ |
||
36 | 'LDAPGroupMappings' => 'SilverStripe\\ActiveDirectory\\Model\\LDAPGroupMapping' |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * Add a field to the Group_Members join table so we can keep track |
||
41 | * of Members added to a mapped Group. |
||
42 | * |
||
43 | * See {@link LDAPService::updateMemberFromLDAP()} for more details |
||
44 | * on how this gets used. |
||
45 | * |
||
46 | * @var array |
||
47 | */ |
||
48 | private static $many_many_extraFields = [ |
||
49 | 'Members' => [ |
||
50 | 'IsImportedFromLDAP' => 'Boolean' |
||
51 | ] |
||
52 | ]; |
||
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | * @param FieldList $fields |
||
57 | */ |
||
58 | public function updateCMSFields(FieldList $fields) |
||
109 | |||
110 | /** |
||
111 | * LDAPGroupMappings are inherently relying on groups and can be removed now. |
||
112 | */ |
||
113 | public function onBeforeDelete() |
||
119 | } |
||
120 |
This check marks private properties in classes that are never used. Those properties can be removed.