lib/modules/sambaGroupMapping.inc
Properties
Description
Manages Samba 3 accounts for groups.Classes
sambaGroupMapping
Description
Manages the object class "sambaGroupMapping" for groups.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
__construct, build_uploadAccounts, display_html_attributes, display_html_members, getCn, getDomains, getGID, get_metaData, get_pdfEntries, get_profileOptions, get_uploadColumns, loadSIDCache, load_Messages, load_profile, module_complete, module_ready, process_attributes, process_members, save_attributes,__construct( string $scope, ) : n/a
Description
Creates a new module for Samba 3 groups.Arguments
Name | Type | Description | Default |
---|---|---|---|
$scope | string | account type |
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 |
display_html_attributes( ) : \htmlElement
Description
Returns the HTML meta data for the main account page.Return value
Type | Description |
---|---|
\htmlElement | HTML meta data |
display_html_members( ) : \htmlElement
Description
This function will create the meta HTML code to show a page to add members.Return value
Type | Description |
---|---|
\htmlElement | HTML meta data |
getCn( ) : String
Description
Gets the cn from the Unix group module.Return value
Type | Description |
---|---|
String | cn attribute |
getDomains( ) : array
Description
Returns a list of existing Samba 3 domains.Return value
Type | Description |
---|---|
array | list of samba3domain objects |
getGID( ) : String
Description
Gets the GID number from the Unix group module.Return value
Type | Description |
---|---|
String | GID number |
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( ) : array
Description
Returns the PDF entries for this module.Return value
Type | Description |
---|---|
array | list of possible PDF entries |
get_profileOptions( ) : \htmlElement
Description
Returns a list of elements for the account profiles.Return value
Type | Description |
---|---|
\htmlElement | profile elements |
get_uploadColumns( array $selectedModules, ) : array
Description
Returns an array containing all input columns for the file upload.Calling this method does not require the existence of an enclosing {@link accountContainer}.
This funtion returns an array which contains subarrays which represent an upload column. Syntax of column arrays:
array(
string: name, // fixed non-translated name which is used as column name (should be of format:
string: description, // short descriptive name
string: help, // help ID
string: example, // example value
string: values, // possible input values (optional)
string: default, // default value (optional)
boolean: required // true, if user must set a value for this column
boolean: unique // true if all values of this column must be different values (optional, default: "false")
)
Arguments
Name | Type | Description | Default |
---|---|---|---|
$selectedModules | array | list of selected account modules |
Return value
Type | Description |
---|---|
array | column list |
Tags
Name | Description |
---|---|
see |
loadSIDCache( ) : n/a
Description
Loads the list of Samba accounts into the cache.Return value
Type | Description |
---|---|
n/a | n/a |
load_Messages( ) : n/a
Description
this functin fills the error message array with messagesReturn value
Type | Description |
---|---|
n/a | n/a |
load_profile( array $profile, ) : n/a
Description
Loads the values of an account profile into internal variables.Arguments
Name | Type | Description | Default |
---|---|---|---|
$profile | array | hash array with profile values (identifier => value) |
Return value
Type | Description |
---|---|
n/a | n/a |
module_complete( ) : boolean
Description
This function is used to check if all settings for this module have been made.Return value
Type | Description |
---|---|
boolean | true, if settings are complete |
Tags
Name | Description |
---|---|
see |
module_ready( ) : boolean
Description
This function is used to check if this module page can be displayed.It returns false if a module depends on data from other modules which was not yet entered.
Return value
Type | Description |
---|---|
boolean | true, if page can be displayed |
process_attributes( ) : array
Description
Processes user input of the primary module page.It checks if all input values are correct and updates the associated LDAP attributes.
Return value
Type | Description |
---|---|
array | list of info/error messages |
process_members( ) : array
Description
Processes user input of the members page.It checks if all input values are correct and updates the associated LDAP attributes.
Return value
Type | Description |
---|---|
array | list of info/error messages |
save_attributes( ) : array
Description
Returns a list of modifications which have to be made to the LDAP account.Return value
Type | Description |
---|---|
array | list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/postModify actions) |