Synchronizing information with LDAP and authenticating users by membership in the LDAP security group
Example of configuration file
label
- Full label of field (used e.g. in view);altLabel
- Short label of field (used e.g. in table);priority
- Priority (used as an order in the header of the table);truncate
- Truncate long text in a table;rules
- Validation rules (used when saving data);default
- Default vale (used when saving data).Employee
and Department
app/Plugin/CakeLdap/Model/Employee.php.default
to app/Model/Employee.php
or
app/Plugin/CakeLdap/Model/Department.php.default
to app/Model/Department.php
EmployeeInfo
app/Plugin/CakeLdap/View/Helper/EmployeeInfoHelper.php.default
to app/View/Helper/EmployeeInfoHelper.php
orelement
:
In the method Employee::getExtendFieldsConfig
set the type as element
for the SomeModel.field
field, e.g.:
/**
* Return fields configuration for helper
*
* @return array Return array of information about extended
* fields in format:
* [
* 'modelName' => [
* 'type' => 'string',
* 'truncate' => false,
* ]
* ],
* where:
* - modelName - is name of model, or Hash::path.
* - type - type of data. Can be one of:
* integer, biginteger, float, date, time, datetime,
* timestamp, boolean, guid, photo, mail, string, text,
* binary, employee, manager, subordinate, department or
* element.
* - truncate - truncate text.
*/
public function getExtendFieldsConfig() {
$result = parent::getExtendFieldsConfig();
$resultExtend = [
'SomeModel' => [
'type' => 'element',
'truncate' => true,
]
];
$result += $resultExtend;
return $result;
}
View
element file from app/Plugin/CakeLdap/View/Elements/infoEmployeeExtendTemplate.ctp.default
to app/View/Elements/infoEmployeeSomeModel.ctp
Employees
, copy view element file from
app/Plugin/CakeLdap/View/Elements/actionTableEmployee.ctp.default
to app/View/Elements/actionTableEmployee.ctp
,
and modify itapp/Plugin/CakeLdap/View/Elements/treeItemEmployeeFull.ctp
to app/View/Elements/
,
and modify itapp/Plugin/CakeLdap/View/Elements/treeItemEmployeeFullDraggable.ctp
to app/View/Elements/
,
and modify it