diff --git a/lam/HISTORY b/lam/HISTORY
index 2eddeda6..51b2ff91 100644
--- a/lam/HISTORY
+++ b/lam/HISTORY
@@ -1,3 +1,11 @@
+??? 1.2.0
+ - Samba: better handling of date values
+
+ Developers:
+ API changes:
+ - removed get_configDescription() from module interface
+
+
01.11.2006 1.1.1
- Lamdaemon: added test page (Tools -> Tests -> Lamdaemon test)
- LAM Pro: Samba passwords can now be synchronized with Unix password
@@ -18,6 +26,7 @@
- process_...() functions: returned messages are no longer grouped
(e.g. return: array(array('INFO', 'headline', 'text'), array('INFO', 'headline2', 'text2')))
+
10.08.2006 1.0.4
- added Russian translation
- Samba 3: added policies for domain objects
diff --git a/lam/docs/README.upgrade.txt b/lam/docs/README.upgrade.txt
index e6d66a63..9c7e7981 100644
--- a/lam/docs/README.upgrade.txt
+++ b/lam/docs/README.upgrade.txt
@@ -1,6 +1,23 @@
Upgrade instructions:
=====================
+
+1.1.x -> 1.2.0:
+===============
+
+
+Users:
+
+No changes.
+
+
+Developers:
+
+API changes:
+ - removed get_configDescription() from module interface
+
+
+
1.0.4 -> 1.1.0:
===============
@@ -19,6 +36,7 @@ API changes:
(e.g. return: array(array('INFO', 'headline', 'text'), array('INFO', 'headline2', 'text2')))
+
1.0.0 -> 1.0.2:
===============
diff --git a/lam/docs/devel/modules-specification.htm b/lam/docs/devel/modules-specification.htm
index e23f0f6c..86a895ad 100644
--- a/lam/docs/devel/modules-specification.htm
+++ b/lam/docs/devel/modules-specification.htm
@@ -1,9 +1,7 @@
-
-
-
- Module specification
+
+ Module specification
+
-
+
This document describes the module
interface for LDAP Account Manager
@@ -45,8 +42,7 @@ All module classes should extend the baseModule class.
- function can_manage()
+ | function can_manage()
|
@@ -62,8 +58,7 @@ otherwise false.
- function get_alias()
+ | function get_alias()
|
@@ -83,8 +78,7 @@ sure that there is a general alias for unknown types.
- function is_base_module()
+ | function is_base_module()
|
@@ -103,8 +97,7 @@ is structural.
- function get_ldap_filter()
+ | function get_ldap_filter()
|
@@ -119,8 +112,7 @@ combined with the "and" parts.
The resulting LDAP filter will look like this:
(&(|(OR1)(OR2)(OR3))(AND1)(AND2)(AND3))
-Example: return "('or' =>
+Example: return "('or' =>
'(objectClass=posixAccount)', 'and' => '(!(uid=*$))')"
2.1.5. getManagedObjectClasses*
@@ -128,8 +120,7 @@ The resulting LDAP filter will look like this:
- function getManagedObjectClasses()
+ | function getManagedObjectClasses()
|
@@ -140,16 +131,14 @@ Returns an array of object class names which are managed by this module.
This is used to fix spelling errors in LDAP-Entries (e.g. if
"posixACCOUNT" is read instead of "posixAccount" from LDAP).
-Example: return "('posixAccount')"
+Example: return "('posixAccount')"
2.1.6. getLDAPAliases*
- function getLDAPAliases()
+ | function getLDAPAliases()
|
@@ -165,8 +154,7 @@ This function returns a list of LDAP attribute alias names.
- function get_RDNAttributes()
+ | function get_RDNAttributes()
|
@@ -180,8 +168,7 @@ priority ("low"/"normal"/"high").
Attributes with higher priority are placed higher in the drop down box
for the RDN selection.
-Example: return "('uid' =>
+Example: return "('uid' =>
'normal', 'cn' => 'low')"
@@ -190,8 +177,7 @@ for the RDN selection.
- function
+ | function
get_dependencies()
|
@@ -200,28 +186,23 @@ get_dependencies()
This function returns a list of modules it depends on.
-The return value is an array with two sub arrays, "depends" and "conficts".
+The return value is an array with two sub arrays, "depends" and "conficts".
All values of the conflict array are string values with module names.
All values of the depends array are either string values with module
names or arrays which include only string values with module names. If
an element of the depends array is itself an array, this means that
your module depends on one of these modules.
-Example: return array("depends"
+Example: return array("depends"
=> array("posixAccount", array("qmail", "sendmail")), "conflicts"
-=> array("exim"));
+=> array("exim"));
2.1.9. get_metaData()
- function get_metaData()
+ | function get_metaData()
|
@@ -237,8 +218,7 @@ true);
- function get_configOptions($scopes,
+ | function get_configOptions($scopes,
$allScopes)
|
@@ -246,8 +226,7 @@ $allScopes)
Returns a list of configuration options.
-$scopes is a list of account types (user, group, host)
+$scopes is a list of account types (user, group, host)
which are used.
$allScopes is a list of all
active account modules and their scopes (module => array(scopes))
@@ -260,39 +239,12 @@ The name attributes are used
as keywords to load and save settings. We recommend to use the module
name as prefix for them (e.g. posixAccount_homeDirectory) to avoid
naming confilcts.
-
-2.1.11. get_configDescriptions()*
+
2.1.11. check_configOptions*
- function get_configDescriptions()
- |
-
-
-
-
-Returns the description of every configuration option and the legend of
-the module fieldset on the configuration page.
-
-The return value is a hash
-array with this format:
-
- array( 'legend'
-=> 'Some general description for fieldset',
-
- 'descriptions' => array('option1'
-=> 'description1', ...))
-
-2.1.12. check_configOptions*
-
-
-
-
- function check_configOptions($scopes,
+ | function check_configOptions($scopes,
$options)
|
@@ -310,17 +262,15 @@ are all arrays containing one or more elements.
If the input data is invalid the return value is an array that contains
arrays to build StatusMessages (0 => message type, 1 => message
head, 2 => message text, 3 => additional variables).
-If no errors occured the function returns an empty array.
+If no errors occured the function returns an empty array.
-2.1.13. get_scope()
+2.1.12. get_scope()
- function get_scope()
+ | function get_scope()
|
@@ -331,13 +281,12 @@ Returns the account type (user/group/host) of this module object.
This function is provided by the
baseModule and should not be overwritten.
-2.1.14. get_uploadColumns*
+2.1.13. get_uploadColumns*
- function get_uploadColumns()
+ | function get_uploadColumns()
|
@@ -356,33 +305,26 @@ help: help ID
string
example: example value
string
-values: possible input values (optional)
- string default: default value (optional)
+values: possible input values (optional)
+ string default: default value (optional)
boolean
-required: true, if user must set a value for this column (optional, default:
+required: true, if user must set a value for this column (optional, default:
"false")
boolean
unique: true if
-all values of this column must be different values (optional, default:
+all values of this column must be different values (optional, default:
"false")
-2.1.15. get_uploadPreDepends*
+2.1.14. get_uploadPreDepends*
- function get_uploadPreDepends()
+ | function get_uploadPreDepends()
|
@@ -392,13 +334,12 @@ Returns a list of module names which must be processed before this
module at builing accounts.
The named modules may not be active, LAM will check this automatically.
-2.1.16. build_uploadAccounts
+2.1.15. build_uploadAccounts
- function get_uploadAccounts($rawAccounts,
+ | function get_uploadAccounts($rawAccounts,
$ids, $partialAccounts)
|
@@ -419,13 +360,12 @@ format is the same as used for ldap_add().
Returns an array which contains sub arrays to generate StatusMessages
if any errors occured.
-2.1.17. do_uploadPostActions
+2.1.16. do_uploadPostActions
- function do_uploadPostActions($data, $ids,
+ | function do_uploadPostActions($data, $ids,
$failed, &$temp)
|
@@ -436,8 +376,7 @@ This function is responsible to do additional tasks after the account
has been created in LDAP.
E.g. modifying group memberships, adding Quota etc..
-This function is called as long as the returned status is 'finished'. Please make sure that
+This function is called as long as the returned status is 'finished'. Please make sure that
one function call lasts no longer than 3-4 seconds. Otherwise the
upload may fail because the time limit is exceeded. You should not make
more than one LDAP operation in each call.
@@ -465,13 +404,12 @@ array() // List of arrays which are used to generate
StatusMessages
)
-2.1.18. get_profileOptions*
+2.1.17. get_profileOptions*
- function get_profileOptions()
+ | function get_profileOptions()
|
@@ -489,13 +427,12 @@ as keywords to load and save profiles. We recommend to use the module
name as prefix for them (e.g. posixAccount_homeDirectory) to avoid
naming confilcts.
-2.1.19. check_profileOptions*
+2.1.18. check_profileOptions*
- function check_profileOptions($options)
+ | function check_profileOptions($options)
|
@@ -510,16 +447,14 @@ are all arrays containing one or more elements.
If the input data is invalid the return value is an array that contains
arrays to build StatusMessages (0 => message type, 1 => message
head, 2 => message text, 3 => additional variables).
-If no errors occured the function returns an empty array.
+If no errors occured the function returns an empty array.
-2.1.20. load_profile*
+2.1.19. load_profile*
- function load_profile($profile)
+ | function load_profile($profile)
|
@@ -532,13 +467,12 @@ internal data structures.
is an hash array (identifier => array(values)) with all values
of an account profile.
-2.1.21. getRequiredExtensions*
+2.1.20. getRequiredExtensions*
- function getRequiredExtensions()
+ | function getRequiredExtensions()
|
@@ -547,6 +481,95 @@ of an account profile.
This function returns a list of PHP extensions (e.g. mhash) which are
needed by this module.
+
+2.1.21. getSelfServiceSearchAttributes*
+
+
+
+
+
+
+
+ function getSelfServiceSearchAttributes()
+ |
+
+
+
+
+
+
+This function returns a list of possible LDAP attributes (e.g. uid, cn, ...) which can be used to search for LDAP objects.
+
+
+2.1.22. getSelfServiceFields*
+
+
+
+
+
+
+
+ function getSelfServiceFields()
+ |
+
+
+
+
+
+
+This function returns a list of possible self service fields and their descriptions.
+
+return array ('myField' => 'Field description');
+
+
+2.1.23. getSelfServiceOptions
+
+
+
+
+
+
+
+ function getSelfServiceOptions($fields, $attributes)
+ |
+
+
+
+
+
+Builds and returns the meta HTML code for each self service field.
+
+$fields: list of self service field names
+$attributes: LDAP attributes of the current account (all lower case)
+
+
+2.1.24. checkSelfServiceOptions
+
+
+
+
+
+
+
+ function checkSelfServiceOptions($fields, $attributes)
+ |
+
+
+
+
+
+Returns a list of LDAP operations and error messages.
+
+$fields: list of self service field names
+
+$attributes: LDAP attributes of the current account (all lower case)
+
+return array(
+ 'messages' => array(array('ERROR', 'Error topic', 'Error message')),
+ 'add' => array('mail' => array('test@test.com')),
+ 'mod' => array(),
+ 'del' => array(),
+);
@@ -557,15 +580,13 @@ needed by this module.
- function init($base)
+ | function init($base)
|
-Every module needs a initializing function that has an account
+Every module needs a initializing function that has an account
container as argument $base.
With this account container you can interact with other modules and use
several helper functions.
@@ -575,8 +596,7 @@ several helper functions.
- function module_ready()
+ | function module_ready()
|
@@ -595,16 +615,14 @@ which returns true as default.
- function module_complete()
+ | function module_complete()
|
This function tells LAM if it can create/modify the LDAP account. If
-your module needs any additional input then set this to false. The user will be notified
+your module needs any additional input then set this to false. The user will be notified
that your module needs more input.
This function is implemented by the baseModule
@@ -616,8 +634,7 @@ which returns true as default.
- function getButtonStatus()
+ | function getButtonStatus()
|
@@ -641,8 +658,7 @@ shown
- function get_help($helpID)
+ | function get_help($helpID)
|
@@ -662,8 +678,7 @@ section 4. "Help entry syntax".
- function get_PDF_Entries()
+ | function get_PDF_Entries()
|
@@ -684,8 +699,7 @@ syntax".
- function dynamic_Message($attribute, $id)
+ | function dynamic_Message($attribute, $id)
|
@@ -705,8 +719,7 @@ Returnis an array as expected from StatusMessage().
- function load_Messages()
+ | function load_Messages()
|
@@ -724,8 +737,7 @@ $this->messages[x][y][z]
- function load_attributes($attr)
+ | function load_attributes($attr)
|
@@ -750,8 +762,7 @@ separat.
- function save_attributes()
+ | function save_attributes()
|
@@ -780,8 +791,7 @@ and $this->orig.
- function delete_attributes($post)
+ | function delete_attributes($post)
|
@@ -799,8 +809,7 @@ deleted.
- function process_attributes($post)
+ | function process_attributes($post)
|
@@ -826,8 +835,7 @@ allowed here.'));
- function process_*($post)
+ | function process_*($post)
|
@@ -846,8 +854,7 @@ is needed to interact with the user.
- function display_html_attributes($post)
+ | function display_html_attributes($post)
|
@@ -866,8 +873,7 @@ is needed t interact with the user.
- function display_html_*($post)
+ | function display_html_*($post)
|
@@ -887,8 +893,7 @@ is needed t interact with the user.
- function display_html_delete($post)
+ | function display_html_delete($post)
|
@@ -913,15 +918,9 @@ formats.
The modules are not allowed to display HTML code directly but return
meta HTML code. This allows to have a common design for all module
pages.
-Meta HTML code is always returned as a three dimensional array[a][b][c] where a is the row number, b is the coumn number and c is is a data elememt.
+Meta HTML code is always returned as a three dimensional array[a][b][c] where a is the row number, b is the coumn number and c is is a data elememt.
-Format for data elements:
+Format for data elements:
A data element is an array
which contains the data to display.
@@ -938,8 +937,7 @@ fieldset.
- legend: The legend of
the fieldset.
- - value: A data element. Can be used
+
- value: A data element. Can be used
recursively.
help: Adds a help link.
@@ -998,8 +996,7 @@ true then the entries will not be sorted. Default is false.
table: Adds a table. Can
be used recursively.
- - value: A data element. Can be used
+
- value: A data element. Can be used
recursively.
text: Inserts a text
@@ -1058,10 +1055,7 @@ height attribute for td elements
Input buttons which should load a different subpage of a module must
have a special name attribute:
-name => 'form_subpage_' . <module name> . '_' . <subpage name> . '_' . <button name>
+name => 'form_subpage_' . <module name> . '_' . <subpage name> . '_' . <button name>
- <module name>: name
of this account module (e.g. 'posixAccount')
@@ -1073,8 +1067,7 @@ name to distinguish buttons (e.g. 'ok'/'cancel'/'back')
-Example:
+Example:
array(
0 => array(
@@ -1112,19 +1105,16 @@ the help entry.
4.1. Internal help entries
-ext (REQUIRED)
+ext (REQUIRED)
Must be FALSE in this case.
-Headline (REQUIRED)
+Headline (REQUIRED)
The headline of this help entry. Can consist of any alpha-numeric
characters. No HTML/CSS elements are not allowed here.
-Text (REQUIRED)
+Text (REQUIRED)
The text of this help entry. Can constist if any alpha-numeric
characters and can contain placeholder for variables passed to this
help entry. The placeholder must follow the syntax for placeholder
@@ -1141,8 +1131,7 @@ number except the '0'.
2. This number ($i) must either be '1' or $i -1 must be present.
-SeeAlso (OPTIONAL)
+SeeAlso (OPTIONAL)
An array of references to anonther related subjects. Each row of the
array must contain a field called "text" with the text that should be
displayed and may contain a field called "link" which is used as value
@@ -1151,13 +1140,11 @@ for the href attribute of a HTML tag when set.
-ext (REQUIRED)
+ext (REQUIRED)
Must be TRUE in this case.
-Link (REQUIRED)
+Link (REQUIRED)
The complete filename of the file stored under the help/ directory
which should be displayed when this help entry is called.
@@ -1166,8 +1153,7 @@ which should be displayed when this help entry is called.
5. PDF syntax
The get_pdfEntries() function uses XML formatted commands to define the
-PDF output. Each part in the PDF document is surrounded by "<block>"
+PDF output. Each part in the PDF document is surrounded by "<block>"
and "</block>".
Inside the <block> tags there are different ways to format the
@@ -1177,54 +1163,35 @@ output:
and value: <block><key>attribute
name</key><value>attribute
value</value></block>
- table: <block><key>attribute
-name</key><tr><td>value<td><td>value<td></tr></block><block><tr><td>value</td><td>value<td></tr></block>
+ table: <block><key>attribute
+name</key><tr><td>value<td><td>value<td></tr></block><block><tr><td>value</td><td>value<td></tr></block>
Special commands:
- Alignment in <td>:
-You can specify the alignment in <td> tags with align=(L|R|C)
+You can specify the alignment in <td> tags with align=(L|R|C)
(e.g. <td align=\"L\">)
- Cell width: <td>
allows an attribute "width" to set the cell width (e.g. <td
width=20%> or <td width=30>).
- Line breaks: Line breaks
-can be specified by adding a <br />
+can be specified by adding a <br />
tag. The new line will start at the left border of the PDF document.
-Examples:
+Examples:
-1. Simple name+value lines:
+1. Simple name+value lines:
In most cases you will just want to display a single line per attribute
with its name and value.
'myAttribute'
-=> '<block><key>AttrName</key><value>12345</value></block>'
+=> '<block><key>AttrName</key><value>12345</value></block>'
-This will give the following PDF output: AttrName: 12345
+This will give the following PDF output: AttrName: 12345
2. Multiline values:
@@ -1237,22 +1204,14 @@ one column but can just use more <td> tags per <block> tag
to display more columns.
'myAttribute'
-=> '<block><key>AttrName</key><tr><td
-align=\"L\">123</td></tr></block><block><tr><td
-align=\"L\">456</td></tr></block><block><tr><td
-align=\"L\">789</td></tr></block>'
+=> '<block><key>AttrName</key><tr><td
+align=\"L\">123</td></tr></block><block><tr><td
+align=\"L\">456</td></tr></block><block><tr><td
+align=\"L\">789</td></tr></block>'
This will give the following PDF output:
-
+
AttrName:
@@ -1263,8 +1222,7 @@ This will give the following PDF output:
|
|
- 456
+ | 456
|
@@ -1293,25 +1251,21 @@ array("user", "host")
6.3 get_ldap_filter()
"ldap_filter" => array
- Example: array('or' =>
+ Example: array('or' =>
'objectClass=posixAccount', 'and' => '(!(uid=*$))')
6.4 getManagedObjectClasses()
"objectClasses" => array
- Example: array('posixAccount')
+ Example: array('posixAccount')
6.5 getLDAPaliases()
"LDAPaliases" => array()
-Example: array('commonName'
+Example: array('commonName'
=> 'cn')
@@ -1320,8 +1274,7 @@ array("user", "host")
6.6 get_RDNAttributes()
"RDN" => array
- Example: array('uid' =>
+ Example: array('uid' =>
'normal', 'cn' => 'low')
@@ -1330,20 +1283,15 @@ array("user", "host")
"dependencies" => array
- Example: array("depends"
+ Example: array("depends"
=> array("posixAccount", array("qmail", "sendmail")), "conflicts"
-=> array("exim"))
+=> array("exim"))
6.8 get_profileOptions()
"profile_options" => array
- Syntax for array is the same as for the
+ Syntax for array is the same as for the
return value of get_profileOptions().
@@ -1360,61 +1308,32 @@ the names of the option identifiers.
type:
determines how to check input
- - regex: check with regular expression from regex variable, case sensitive
- - regex_i: check with regular expression from regex variable, case insensitive
- - int_greater: integer value of cmp_name1 must be
-greater than the integer value from the option cmp_name2
- - int_greaterOrEqual: integer value of cmp_name1
-must be greater or equal than the integer value from the option cmp_name2
+ - regex: check with regular expression from regex variable, case sensitive
+ - regex_i: check with regular expression from regex variable, case insensitive
+ - int_greater: integer value of cmp_name1 must be
+greater than the integer value from the option cmp_name2
+ - int_greaterOrEqual: integer value of cmp_name1
+must be greater or equal than the integer value from the option cmp_name2
- error_message: message that is displayed if input value
+ error_message: message that is displayed if input value
was syntactically incorrect
- array
to build StatusMessages (0 => message type, 1 => message
-head, 2 => message text, 3 => additional variables)
+head, 2 => message text, 3 => additional variables)
- regex: regular expression string (only if type is regex/regex_i)
- cmp_name1:
+ regex: regular expression string (only if type is regex/regex_i)
+ cmp_name1:
name of first input
-variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
- cmp_name2: name of second input
-variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
+variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
+ cmp_name2: name of second input
+variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
- required: true or false, if this input field must be
+ required: true or false, if this input field must be
filled set to true (optional)
- required_message: message that is displayed if no input value was
-given (only if required == true)
+ required_message: message that is displayed if no input value was
+given (only if required == true)
- array to build StatusMessages (0 => message type, 1
=> message
@@ -1437,65 +1356,60 @@ $this->attributes.
'host' => array, 'all' => array)
The values from 'all'
-are always returned, the other values only if they are inside the $scopes array.
+are always returned, the other values only if they are inside the $scopes array.
- Syntax for sub arrays is the same as for
+ Syntax for sub arrays is the same as for
the
return value of get_configOptions().
-
-
-6.12 get_configDescriptions()
-
- "config_descriptions" => array
-
- Syntax for array is the same as for the
-return value of get_configDescriptions().
-
-
-6.13 check_configOptions()
+
6.12 check_configOptions()
"config_checks" => array('user' => array,
'host' => 'array', 'all' => array)
The values from 'all' are always used for checking,
-the other values only if they are inside the $scopes array.
+the other values only if they are inside the $scopes array.
- Syntax for sub arrays is the same as for
+ Syntax for sub arrays is the same as for
check_profileOptions().
-6.14 get_uploadColumns()
+6.13 get_uploadColumns()
"upload_columns" => array()
Syntax for array is the same as for
the
return value of get_uploadColumns().
-6.15 get_uploadPreDepends()
+6.14 get_uploadPreDepends()
"upload_preDepends" => array()
Syntax for array is the same as for
the
return value of get_uploadPreDepends().
-6.16 getRequiredExtensions()
+6.15 getRequiredExtensions()
"extensions" => array()
-Example: array('mhash')
+
Example: array('mhash')
-
-
-
+
+6.16 getSelfServiceSearchAttributes()
+
+
+"selfServiceSearchAttributes" => array()
+
+
+Example: array('uid')
+
+
+6.17 getSelfServiceFields()
+
+
+"selfServiceFieldSettings" => array()
+
+
+Example: array('pwd' => 'Password')
+
+
+