lib/modules/ldapPublicKey.inc
Properties
Description
Manages SSH public keys.Classes
ldapPublicKey
Description
Manages SSH public keys.It implements the complete module interface and uses meta-data provided by the account modules for its functions.
Location and naming of modules
All LAM modules are placed in lib/modules/ and are named "
You can avoid to override many functions by using {@link get_metaData()}.
All module classes should extend the baseModule class.
Methods
ajaxDeleteSelfServiceKey, ajaxUpload, build_uploadAccounts, checkSelfServiceOptions, display_html_attributes, getSelfServiceKeys, getSelfServiceKeysJSBlock, getSelfServiceOptions, get_metaData, get_pdfEntries, handleAjaxRequest, invalidAjaxRequest, load_Messages, process_attributes,ajaxDeleteSelfServiceKey( array $data, ) : n/a
Description
Manages the deletion of a key.Arguments
Name | Type | Description | Default |
---|---|---|---|
$data | array | JSON data |
Return value
Type | Description |
---|---|
n/a | n/a |
ajaxUpload( ) : n/a
Description
Handles an AJAX file upload and prints the JSON result.Return value
Type | Description |
---|---|
n/a | n/a |
build_uploadAccounts( array $rawAccounts, array $ids, array $partialAccounts, array $selectedModules, ) : array
Description
In this function the LDAP account is built up.Arguments
Name | Type | Description | Default |
---|---|---|---|
$rawAccounts | array | list of hash arrays (name => value) from user input |
|
$ids | array | list of IDs for column position (e.g. "posixAccount_uid" => 5) |
|
$partialAccounts | array | list of hash arrays (name => value) which are later added to LDAP |
|
$selectedModules | array | list of selected account modules |
Return value
Type | Description |
---|---|
array | list of error messages if any |
checkSelfServiceOptions( string $fields, array $attributes, boolean $passwordChangeOnly, array $readOnlyFields, ) : array
Description
Checks if all input values are correct and returns the LDAP attributes which should be changed.Return values:
messages: array of parameters to create status messages
add: array of attributes to add
del: array of attributes to remove
mod: array of attributes to modify
info: array of values with informational value (e.g. to be used later by pre/postModify actions) Calling this method does not require the existence of an enclosing {@link accountContainer}.
Arguments
Name | Type | Description | Default |
---|---|---|---|
$fields | string | input fields |
|
$attributes | array | LDAP attributes |
|
$passwordChangeOnly | boolean | indicates that the user is only allowed to change his password and no LDAP content is readable |
|
$readOnlyFields | array | list of read-only fields |
Return value
Type | Description |
---|---|
array | messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array())) |
display_html_attributes( ) : \htmlElement
Description
Returns the HTML meta data for the main account page.Return value
Type | Description |
---|---|
\htmlElement | HTML meta data |
getSelfServiceKeys( ) : \htmlTable
Description
Returns the meta HTML code to display the key area.This also includes the file upload.
Return value
Type | Description |
---|---|
\htmlTable | key content |
getSelfServiceKeysJSBlock( ) : \htmlJavaScript
Description
Returns the Java Script functions to manage the keys.Return value
Type | Description |
---|---|
\htmlJavaScript | JS block |
getSelfServiceOptions( array $fields, array $attributes, boolean $passwordChangeOnly, array $readOnlyFields, ) : array
Description
Returns the meta HTML code for each input field.format: array(
Arguments
Name | Type | Description | Default |
---|---|---|---|
$fields | array | list of active fields |
|
$attributes | array | attributes of LDAP account |
|
$passwordChangeOnly | boolean | indicates that the user is only allowed to change his password and no LDAP content is readable |
|
$readOnlyFields | array | list of read-only fields |
Return value
Type | Description |
---|---|
array | list of meta HTML elements (field name => htmlTableRow) |
get_metaData( ) : array
Description
Returns meta data that is interpreted by parent classReturn value
Type | Description |
---|---|
array | array with meta data |
Tags
Name | Description |
---|---|
see |
get_pdfEntries( ) : n/a
Description
Returns a list of PDF entriesReturn value
Type | Description |
---|---|
n/a | n/a |
handleAjaxRequest( ) : n/a
Description
Manages AJAX requests.This function may be called with or without an account container.
Return value
Type | Description |
---|---|
n/a | n/a |
invalidAjaxRequest( String $message = null, ) : n/a
Description
Invalid AJAX request received.Arguments
Name | Type | Description | Default |
---|---|---|---|
$message | String | error message |
null |
Return value
Type | Description |
---|---|
n/a | n/a |