*** empty log message ***
This commit is contained in:
parent
96dcdca729
commit
bff2f14c75
|
@ -1,9 +1,8 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html><head><title>LAM development documentation</title>
|
||||||
<head>
|
|
||||||
<title>LAM development documentation</title>
|
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
||||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
<body>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<h1>LDAP Account Manager - Code overview</h1>
|
<h1>LDAP Account Manager - Code overview</h1>
|
||||||
|
@ -13,14 +12,12 @@ generate the HTML output and the most important functions provided by
|
||||||
the library files.<br>
|
the library files.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<img src="images/lam_overview.png" alt="overview" align="middle"
|
<img src="images/lam_overview.png" alt="overview" align="middle" border="0"><br>
|
||||||
border="0"><br>
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div style="text-align: left;">
|
<div style="text-align: left;">
|
||||||
<table style="text-align: left; width: 100%;" border="0" cellpadding="2"
|
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
|
||||||
cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top; width: 33%;">
|
<td style="vertical-align: top; width: 33%;">
|
||||||
|
@ -104,9 +101,16 @@ browser</a><br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<h2><a href="FAQ.htm">FAQ</a></h2>
|
<h2><a href="FAQ.htm">FAQ</a></h2>
|
||||||
<br>
|
<h2><br>
|
||||||
|
</h2>
|
||||||
|
<h2>Specifications</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="modules-specification.htm">Module specification</a></li>
|
||||||
|
<li><a href="types-specification.htm">Type specification<br>
|
||||||
|
</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body></html>
|
||||||
</html>
|
|
|
@ -2,7 +2,6 @@
|
||||||
<html><head><title>Module HowTo - Account pages</title>
|
<html><head><title>Module HowTo - Account pages</title>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<h1>Module HowTo - Account pages<br>
|
<h1>Module HowTo - Account pages<br>
|
||||||
|
@ -108,33 +107,28 @@ sizeof($this->attributes['macAddress']); $i++) {<br>
|
||||||
$return[] =
|
$return[] =
|
||||||
array(<br>
|
array(<br>
|
||||||
|
|
||||||
0 => array('kind' => 'text', 'text' =>
|
array('kind' => 'text', 'text' =>
|
||||||
_('MAC address')),<br>
|
_('MAC address')),<br>
|
||||||
|
|
||||||
1 => array('kind' => 'input', 'name' =>
|
array('kind' => 'input', 'name' =>
|
||||||
'macAddress' . $i, 'type' => 'text', 'size' => '17', 'maxlength'
|
'macAddress' . $i, 'type' => 'text', 'size' => '17', 'maxlength'
|
||||||
=> '17', 'value' => $this->attributes['macAddress'][$i]),<br>
|
=> '17', 'value' => $this->attributes['macAddress'][$i]),<br>
|
||||||
|
|
||||||
2 => array('kind' => 'input', 'type' =>
|
array('kind' => 'input', 'type' =>
|
||||||
'submit', 'name' => 'delMAC' . $i, 'value' => _("Remove")),<br>
|
'submit', 'name' => 'delMAC' . $i, 'value' => _("Remove")),<br>
|
||||||
|
|
||||||
3 => array('kind' => 'help', 'value' =>
|
array('kind' => 'help', 'value' =>
|
||||||
'mac'));<br>
|
'mac'));<br>
|
||||||
}<br>
|
}<br>
|
||||||
// input box for new MAC<br>
|
// input box for new MAC<br>
|
||||||
$return[] = array(<br>
|
$return[] = array(<br>
|
||||||
0 =>
|
array('kind' => 'text', 'text' => _('New MAC address')),<br>
|
||||||
array('kind' => 'text', 'text' => _('New MAC address')),<br>
|
array('kind' => 'input', 'name' => 'macAddress', 'type' =>
|
||||||
1 =>
|
|
||||||
array('kind' => 'input', 'name' => 'macAddress', 'type' =>
|
|
||||||
'text', 'size' => '17', 'maxlength' => '17', 'value' => ''),<br>
|
'text', 'size' => '17', 'maxlength' => '17', 'value' => ''),<br>
|
||||||
2 =>
|
array('kind' => 'input', 'type' => 'submit', 'name' =>
|
||||||
array('kind' => 'input', 'type' => 'submit', 'name' =>
|
|
||||||
'addMAC', 'value' => _("Add")),<br>
|
'addMAC', 'value' => _("Add")),<br>
|
||||||
3 =>
|
array('kind' => 'help', 'value' => 'mac'),<br>
|
||||||
array('kind' => 'help', 'value' => 'mac'),<br>
|
array('kind' => 'input', 'type' => 'hidden', 'value' =>
|
||||||
4 =>
|
|
||||||
array('kind' => 'input', 'type' => 'hidden', 'value' =>
|
|
||||||
sizeof($this->attributes['macAddress']), 'name' => 'mac_number'));<br>
|
sizeof($this->attributes['macAddress']), 'name' => 'mac_number'));<br>
|
||||||
return $return;<br>
|
return $return;<br>
|
||||||
}<br>
|
}<br>
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html><head><title>Module HowTo - Configuration options</title>
|
||||||
<head>
|
|
||||||
<title>Module HowTo - Configuration options</title>
|
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
||||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
<body>
|
||||||
<div style="text-align: center;">
|
|
||||||
<h1>Module HowTo - Configuration options<br>
|
<h1>Module HowTo - Configuration options<br>
|
||||||
</h1>
|
</h1>
|
||||||
<div style="text-align: left;"><br>
|
<div style="text-align: left;"><br>
|
||||||
|
@ -26,19 +24,16 @@ will display all options in one fieldset for each module. Please notice
|
||||||
that there will be no separation on account types if you module is
|
that there will be no separation on account types if you module is
|
||||||
suitable for different account types.<br>
|
suitable for different account types.<br>
|
||||||
<br>
|
<br>
|
||||||
The configuration options are specified with <span
|
The configuration options are specified with <span style="font-weight: bold;">get_configOptions()</span>
|
||||||
style="font-weight: bold;">get_configOptions()</span>
|
|
||||||
or <span style="font-weight: bold;">meta['config_options']</span>.<br>
|
or <span style="font-weight: bold;">meta['config_options']</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
<br>
|
||||||
The <span style="font-style: italic;">posixGroup</span> module offers
|
The <span style="font-style: italic;">posixGroup</span> module offers
|
||||||
three configuration options. The min/maximum values for GIDs and the
|
three configuration options. The min/maximum values for GIDs and the
|
||||||
password hash type.<br>
|
password hash type.<br>
|
||||||
<br>
|
<br>
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;"> /**<br>
|
<td style="vertical-align: top;"> /**<br>
|
||||||
|
@ -51,46 +46,46 @@ class<br>
|
||||||
get_metaData() {<br>
|
get_metaData() {<br>
|
||||||
$return = array();<br>
|
$return = array();<br>
|
||||||
// configuration options<br>
|
// configuration options<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'config_options'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>] = array(<br>
|
||||||
style="color: rgb(255, 0, 0);">'config_options'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'group'</span>] = array(<br>
|
|
||||||
array(<br>
|
array(<br>
|
||||||
|
|
||||||
0 => array('kind' => 'text', 'text' => '<b>' .
|
array('kind' => 'text', 'text' =>
|
||||||
|
'<b>' .
|
||||||
_('Minimum GID number') . " *: </b>"),<br>
|
_('Minimum GID number') . " *: </b>"),<br>
|
||||||
|
array('kind' => 'input', 'name' =>
|
||||||
1 => array('kind' => 'input', 'name' =>
|
|
||||||
'posixGroup_minGID', 'type' => 'text', 'size' => '10',
|
'posixGroup_minGID', 'type' => 'text', 'size' => '10',
|
||||||
'maxlength' => '255'),<br>
|
'maxlength' => '255'),<br>
|
||||||
|
|
||||||
2 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
array('kind' => 'text', 'value' =>
|
||||||
|
'&nbsp;'),<br>
|
||||||
3 => array('kind' => 'text', 'text' => '<b>' .
|
|
||||||
|
array('kind' => 'text', 'text' =>
|
||||||
|
'<b>' .
|
||||||
_('Maximum GID number') . " *: </b>"),<br>
|
_('Maximum GID number') . " *: </b>"),<br>
|
||||||
|
array('kind' => 'input', 'name' =>
|
||||||
4 => array('kind' => 'input', 'name' =>
|
|
||||||
'posixGroup_maxGID', 'type' => 'text', 'size' => '10',
|
'posixGroup_maxGID', 'type' => 'text', 'size' => '10',
|
||||||
'maxlength' => '255'),<br>
|
'maxlength' => '255'),<br>
|
||||||
|
|
||||||
5 => array('kind' => 'help', 'value' => 'minMaxGID')),<br>
|
array('kind' => 'help', 'value' =>
|
||||||
|
'minMaxGID')),<br>
|
||||||
array(<br>
|
array(<br>
|
||||||
|
|
||||||
0 => array('kind' => 'text', 'text' => '<b>' .
|
array('kind' => 'text', 'text' =>
|
||||||
|
'<b>' .
|
||||||
_("Password hash type") . ': &nbsp;</b>'),<br>
|
_("Password hash type") . ': &nbsp;</b>'),<br>
|
||||||
|
array('kind' => 'select', 'name' =>
|
||||||
1 => array('kind' => 'select', 'name' =>
|
'posixGroup_pwdHash', 'size' => '1', 'options' => array("CRYPT", "SHA", "SSHA", "MD5", "SMD5",
|
||||||
'posixGroup_pwdHash', 'size' => '1',<br>
|
|
||||||
|
|
||||||
'options' => array("CRYPT", "SHA", "SSHA", "MD5", "SMD5",
|
|
||||||
"PLAIN"), 'options_selected' => array('SSHA')),<br>
|
"PLAIN"), 'options_selected' => array('SSHA')),<br>
|
||||||
|
|
||||||
2 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
array('kind' => 'text', 'value' =>
|
||||||
|
'&nbsp;'),<br>
|
||||||
3 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
|
||||||
|
array('kind' => 'text', 'value' =>
|
||||||
4 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
'&nbsp;'),<br>
|
||||||
|
|
||||||
5 => array('kind' => 'help', 'value' => 'pwdHash'))<br>
|
array('kind' => 'text', 'value' =>
|
||||||
|
'&nbsp;'),<br>
|
||||||
|
array('kind' => 'help', 'value' => 'pwdHash'))<br>
|
||||||
);<br>
|
);<br>
|
||||||
[...]<br>
|
[...]<br>
|
||||||
</td>
|
</td>
|
||||||
|
@ -109,22 +104,19 @@ the browser.<br>
|
||||||
Probably you also want to check if the input data is syntactically
|
Probably you also want to check if the input data is syntactically
|
||||||
correct.<br>
|
correct.<br>
|
||||||
The <span style="font-style: italic;">baseModule</span> already
|
The <span style="font-style: italic;">baseModule</span> already
|
||||||
provides different checks which can be activated with <span
|
provides different checks which can be activated with <span style="font-style: italic;">meta data</span>. However you can also do
|
||||||
style="font-style: italic;">meta data</span>. However you can also do
|
|
||||||
the checking in the module.<br>
|
the checking in the module.<br>
|
||||||
Implementing the function <span style="font-weight: bold;">check_configOptions()</span>
|
Implementing the function <span style="font-weight: bold;">check_configOptions()</span>
|
||||||
in your module will allow you to do the checks yourself. Basic checks
|
in your module will allow you to do the checks yourself. Basic checks
|
||||||
can be defined with <span style="font-weight: bold;">meta['config_checks']</span>.<br>
|
can be defined with <span style="font-weight: bold;">meta['config_checks']</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
<br>
|
||||||
The <span style="font-style: italic;">posixGroup</span> module only
|
The <span style="font-style: italic;">posixGroup</span> module only
|
||||||
needs to check if the GID numbers are correct. The password hash type
|
needs to check if the GID numbers are correct. The password hash type
|
||||||
needs not to be checked as it is a selection.<br>
|
needs not to be checked as it is a selection.<br>
|
||||||
<br>
|
<br>
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;"> /**<br>
|
<td style="vertical-align: top;"> /**<br>
|
||||||
|
@ -137,9 +129,7 @@ class<br>
|
||||||
get_metaData() {<br>
|
get_metaData() {<br>
|
||||||
$return = array();<br>
|
$return = array();<br>
|
||||||
// configuration checks<br>
|
// configuration checks<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_minGID'] =
|
||||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_minGID'] =
|
|
||||||
array (<br>
|
array (<br>
|
||||||
'type' =>
|
'type' =>
|
||||||
'ext_preg',<br>
|
'ext_preg',<br>
|
||||||
|
@ -151,9 +141,7 @@ array (<br>
|
||||||
'required_message' => $this->messages['gidNumber'][5],<br>
|
'required_message' => $this->messages['gidNumber'][5],<br>
|
||||||
|
|
||||||
'error_message' => $this->messages['gidNumber'][5]);<br>
|
'error_message' => $this->messages['gidNumber'][5]);<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_maxGID'] =
|
||||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_maxGID'] =
|
|
||||||
array (<br>
|
array (<br>
|
||||||
'type' =>
|
'type' =>
|
||||||
'ext_preg',<br>
|
'ext_preg',<br>
|
||||||
|
@ -165,9 +153,7 @@ array (<br>
|
||||||
'required_message' => $this->messages['gidNumber'][6],<br>
|
'required_message' => $this->messages['gidNumber'][6],<br>
|
||||||
|
|
||||||
'error_message' => $this->messages['gidNumber'][6]);<br>
|
'error_message' => $this->messages['gidNumber'][6]);<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['cmpGID'] = array (<br>
|
||||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'group'</span>]['cmpGID'] = array (<br>
|
|
||||||
'type' =>
|
'type' =>
|
||||||
'int_greater',<br>
|
'int_greater',<br>
|
||||||
'cmp_name1'
|
'cmp_name1'
|
||||||
|
@ -183,9 +169,7 @@ array (<br>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
||||||
the <span style="font-style: italic;">baseModule</span> will use the <span
|
the <span style="font-style: italic;">baseModule</span> will use the <span style="font-style: italic;">get_preg()</span> function in <span style="font-style: italic;">lib/account.inc</span> for the syntax
|
||||||
style="font-style: italic;">get_preg()</span> function in <span
|
|
||||||
style="font-style: italic;">lib/account.inc</span> for the syntax
|
|
||||||
check. This function already contains regular expressions for the most
|
check. This function already contains regular expressions for the most
|
||||||
common cases.<br>
|
common cases.<br>
|
||||||
To check if the minimum GID is smaller than the maximum GID we define a
|
To check if the minimum GID is smaller than the maximum GID we define a
|
||||||
|
@ -193,61 +177,5 @@ check for the nonexistant option "cmpGID" and define it as optional.
|
||||||
This will do the comparison check.<br>
|
This will do the comparison check.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>3. Descriptions</h2>
|
|
||||||
What is still missing is a descriptive title for the fieldset in the
|
|
||||||
configuration editor and a description for each configuration option
|
|
||||||
which is displayed when the user saves the settings.<br>
|
|
||||||
<br>
|
|
||||||
These descriptions are defined with <span style="font-weight: bold;">get_configDescriptions()</span>
|
|
||||||
or <span style="font-weight: bold;">meta['config_descriptions']</span>.<br>
|
|
||||||
<br>
|
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
|
||||||
The <span style="font-style: italic;">posixGroup</span> module will
|
|
||||||
set a title for the fieldset and a description for the three
|
|
||||||
configuration options.<br>
|
|
||||||
<br>
|
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="vertical-align: top;"> /**<br>
|
|
||||||
* Returns meta data that is interpreted by parent
|
|
||||||
class<br>
|
|
||||||
*<br>
|
|
||||||
* @return array array with meta data<br>
|
|
||||||
*/<br>
|
|
||||||
<span style="font-weight: bold;"> function</span>
|
|
||||||
get_metaData() {<br>
|
|
||||||
$return = array();<br>
|
|
||||||
// configuration descriptions<br>
|
|
||||||
$return[<span
|
|
||||||
style="color: rgb(255, 0, 0);">'config_descriptions'</span>] = array(<br>
|
|
||||||
'legend' =>
|
|
||||||
_("GID ranges for Unix groups"),<br>
|
|
||||||
'descriptions'
|
|
||||||
=> array(<br>
|
|
||||||
|
|
||||||
'posixGroup_minGID' => _("Minimum GID number for Unix groups"),<br>
|
|
||||||
|
|
||||||
'posixGroup_maxGID' => _("Maximum GID number for Unix groups"),<br>
|
|
||||||
|
|
||||||
'posixGroup_pwdHash' => _("Password hash type for Unix
|
|
||||||
groups"),<br>
|
|
||||||
)<br>
|
|
||||||
);<br>
|
|
||||||
[...]<br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
This will set the fieldset title to "GID ranges for Unix groups" and
|
|
||||||
the descriptions for the settings list.<br>
|
|
||||||
<span style="font-weight: bold;"></span>
|
|
||||||
<h2><span style="font-weight: bold;"></span></h2>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</body></html>
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,9 +1,8 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html><head><title>Module HowTo - Account profiles</title>
|
||||||
<head>
|
|
||||||
<title>Module HowTo - Account profiles</title>
|
<link rel="stylesheet" type="text/css" href="style/layout.css"></head>
|
||||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
<body>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<h1>Module HowTo - Account profiles<br>
|
<h1>Module HowTo - Account profiles<br>
|
||||||
|
@ -26,8 +25,7 @@ containing its profile options.<br>
|
||||||
The profile options are specified with <span style="font-weight: bold;">get_profileOptions()</span>
|
The profile options are specified with <span style="font-weight: bold;">get_profileOptions()</span>
|
||||||
or <span style="font-weight: bold;">meta['profile_options']</span>.<br>
|
or <span style="font-weight: bold;">meta['profile_options']</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
<br>
|
||||||
The <span style="font-style: italic;">inetOrgPerson</span>
|
The <span style="font-style: italic;">inetOrgPerson</span>
|
||||||
module has only two attributes which may be set to a default value: job
|
module has only two attributes which may be set to a default value: job
|
||||||
|
@ -35,8 +33,7 @@ title and employee type.<br>
|
||||||
The other attributes are account specific and not useful as profile
|
The other attributes are account specific and not useful as profile
|
||||||
options.<br>
|
options.<br>
|
||||||
<br>
|
<br>
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;"> /**<br>
|
<td style="vertical-align: top;"> /**<br>
|
||||||
|
@ -49,29 +46,28 @@ class<br>
|
||||||
get_metaData() {<br>
|
get_metaData() {<br>
|
||||||
$return = array();<br>
|
$return = array();<br>
|
||||||
// profile elements<br>
|
// profile elements<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'profile_options'</span>] = array(<br>
|
||||||
style="color: rgb(255, 0, 0);">'profile_options'</span>] = array(<br>
|
|
||||||
array(<br>
|
array(<br>
|
||||||
|
|
||||||
0 => array('kind' => 'text', 'text' =>
|
array('kind' => 'text', 'text' =>
|
||||||
_('Job title') . ":"),<br>
|
_('Job title') . ":"),<br>
|
||||||
|
|
||||||
1 => array('kind' => 'input', 'name' =>
|
array('kind' => 'input', 'name' =>
|
||||||
'inetOrgPerson_title', 'type' => 'text', 'size' => '30',
|
'inetOrgPerson_title', 'type' => 'text', 'size' => '30',
|
||||||
'maxlength' => '255'),<br>
|
'maxlength' => '255'),<br>
|
||||||
|
|
||||||
2 => array('kind' => 'help', 'value' =>
|
array('kind' => 'help', 'value' =>
|
||||||
'title')),<br>
|
'title')),<br>
|
||||||
array(<br>
|
array(<br>
|
||||||
|
|
||||||
0 => array('kind' => 'text', 'text' =>
|
array('kind' => 'text', 'text' =>
|
||||||
_('Employee type') . ":"),<br>
|
_('Employee type') . ":"),<br>
|
||||||
|
|
||||||
1 => array('kind' => 'input', 'name' =>
|
array('kind' => 'input', 'name' =>
|
||||||
'inetOrgPerson_employeeType', 'type' => 'text', 'size' => '30',
|
'inetOrgPerson_employeeType', 'type' => 'text', 'size' => '30',
|
||||||
'maxlength' => '255'),<br>
|
'maxlength' => '255'),<br>
|
||||||
|
|
||||||
2 => array('kind' => 'help', 'value' =>
|
array('kind' => 'help', 'value' =>
|
||||||
'employeeType'))<br>
|
'employeeType'))<br>
|
||||||
);<br>
|
);<br>
|
||||||
[...]<br>
|
[...]<br>
|
||||||
|
@ -90,22 +86,19 @@ of the input element might be not enough.<br>
|
||||||
Probably you also want to check if the input data is syntactically
|
Probably you also want to check if the input data is syntactically
|
||||||
correct.<br>
|
correct.<br>
|
||||||
The <span style="font-style: italic;">baseModule</span> already
|
The <span style="font-style: italic;">baseModule</span> already
|
||||||
provides different checks which can be activated with <span
|
provides different checks which can be activated with <span style="font-style: italic;">meta data</span>. However you can also do
|
||||||
style="font-style: italic;">meta data</span>. However you can also do
|
|
||||||
the checking in the module.<br>
|
the checking in the module.<br>
|
||||||
Implementing the function <span style="font-weight: bold;">check_profileOptions()</span>
|
Implementing the function <span style="font-weight: bold;">check_profileOptions()</span>
|
||||||
in your module will allow you to do the checks yourself. Basic checks
|
in your module will allow you to do the checks yourself. Basic checks
|
||||||
can be defined with <span style="font-weight: bold;">meta['profile_checks']</span>.<br>
|
can be defined with <span style="font-weight: bold;">meta['profile_checks']</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
<br>
|
||||||
The <span style="font-style: italic;">inetOrgPerson</span> module only
|
The <span style="font-style: italic;">inetOrgPerson</span> module only
|
||||||
needs some regular expression checks on the input. This can be done by
|
needs some regular expression checks on the input. This can be done by
|
||||||
the <span style="font-style: italic;">baseModule</span>.<br>
|
the <span style="font-style: italic;">baseModule</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;"> /**<br>
|
<td style="vertical-align: top;"> /**<br>
|
||||||
|
@ -118,18 +111,14 @@ class<br>
|
||||||
get_metaData() {<br>
|
get_metaData() {<br>
|
||||||
$return = array();<br>
|
$return = array();<br>
|
||||||
// profile checks<br>
|
// profile checks<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span style="color: rgb(255, 0, 0);">'inetOrgPerson_title'</span>] = array(<br>
|
||||||
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'inetOrgPerson_title'</span>] = array(<br>
|
|
||||||
'type' =>
|
'type' =>
|
||||||
'ext_preg',<br>
|
'ext_preg',<br>
|
||||||
'regex' =>
|
'regex' =>
|
||||||
'title',<br>
|
'title',<br>
|
||||||
|
|
||||||
'error_message' => $this->messages['title'][0]);<br>
|
'error_message' => $this->messages['title'][0]);<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span style="color: rgb(255, 0, 0);">'inetOrgPerson_employeeType'</span>] =
|
||||||
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
|
|
||||||
style="color: rgb(255, 0, 0);">'inetOrgPerson_employeeType'</span>] =
|
|
||||||
array(<br>
|
array(<br>
|
||||||
'type' =>
|
'type' =>
|
||||||
'ext_preg',<br>
|
'ext_preg',<br>
|
||||||
|
@ -144,9 +133,7 @@ array(<br>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
||||||
the <span style="font-style: italic;">baseModule</span> will use the <span
|
the <span style="font-style: italic;">baseModule</span> will use the <span style="font-style: italic;">get_preg()</span> function in <span style="font-style: italic;">lib/account.inc</span> for the syntax
|
||||||
style="font-style: italic;">get_preg()</span> function in <span
|
|
||||||
style="font-style: italic;">lib/account.inc</span> for the syntax
|
|
||||||
check. This function already contains regular expressions for the most
|
check. This function already contains regular expressions for the most
|
||||||
common cases.<br>
|
common cases.<br>
|
||||||
<br>
|
<br>
|
||||||
|
@ -157,22 +144,18 @@ they need for their internal data structures.<br>
|
||||||
The <span style="font-style: italic;">baseModule</span> already
|
The <span style="font-style: italic;">baseModule</span> already
|
||||||
provides the possibility to store profile values directly as LDAP
|
provides the possibility to store profile values directly as LDAP
|
||||||
attributes in <span style="font-style: italic;">$this->attributes</span>.
|
attributes in <span style="font-style: italic;">$this->attributes</span>.
|
||||||
This is done by defining profile-attribute mappings in <span
|
This is done by defining profile-attribute mappings in <span style="font-weight: bold;">meta['profile_mappings']</span>.<br>
|
||||||
style="font-weight: bold;">meta['profile_mappings']</span>.<br>
|
|
||||||
If you have other values than LDAP attributes or need some post
|
If you have other values than LDAP attributes or need some post
|
||||||
processing you can implement the function <span
|
processing you can implement the function <span style="font-weight: bold;">load_profile()</span> in your module.<br>
|
||||||
style="font-weight: bold;">load_profile()</span> in your module.<br>
|
|
||||||
<br>
|
<br>
|
||||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
|
||||||
style="font-weight: bold; text-decoration: underline;">
|
|
||||||
<br>
|
<br>
|
||||||
The <span style="font-style: italic;">inetLocalMailRecipient</span>
|
The <span style="font-style: italic;">inetLocalMailRecipient</span>
|
||||||
module only
|
module only
|
||||||
needs a static mapping. This can be done by
|
needs a static mapping. This can be done by
|
||||||
the <span style="font-style: italic;">baseModule</span>.<br>
|
the <span style="font-style: italic;">baseModule</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
|
||||||
border="0" cellpadding="2" cellspacing="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align: top;"> /**<br>
|
<td style="vertical-align: top;"> /**<br>
|
||||||
|
@ -185,8 +168,7 @@ class<br>
|
||||||
get_metaData() {<br>
|
get_metaData() {<br>
|
||||||
$return = array();<br>
|
$return = array();<br>
|
||||||
// profile mappings<br>
|
// profile mappings<br>
|
||||||
$return[<span
|
$return[<span style="color: rgb(255, 0, 0);">'profile_mappings'</span>] = array(<br>
|
||||||
style="color: rgb(255, 0, 0);">'profile_mappings'</span>] = array(<br>
|
|
||||||
|
|
||||||
'inetLocalMailRecipient_host' => 'mailHost'<br>
|
'inetLocalMailRecipient_host' => 'mailHost'<br>
|
||||||
);<br>
|
);<br>
|
||||||
|
@ -204,5 +186,4 @@ stored as LDAP attribute "mailHost".<br>
|
||||||
<h2><span style="font-weight: bold;"></span></h2>
|
<h2><span style="font-weight: bold;"></span></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body></html>
|
||||||
</html>
|
|
|
@ -570,6 +570,83 @@ $fields:</span> list of self service field names<br>
|
||||||
<span style="font-weight: bold;"> 'mod' => array(),</span><br style="font-weight: bold;">
|
<span style="font-weight: bold;"> 'mod' => array(),</span><br style="font-weight: bold;">
|
||||||
<span style="font-weight: bold;"> 'del' => array(),</span><br style="font-weight: bold;">
|
<span style="font-weight: bold;"> 'del' => array(),</span><br style="font-weight: bold;">
|
||||||
<span style="font-weight: bold;">);</span><br style="font-weight: bold;">
|
<span style="font-weight: bold;">);</span><br style="font-weight: bold;">
|
||||||
|
<span style="font-weight: bold;"><br>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<h3>2.1.25. getSelfServiceSettings</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<table border="0" cellpadding="2" cellspacing="2">
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">function getSelfServiceSettings()</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
Returns a list of self service configuration settings.<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
The return value is an array
|
||||||
|
that contains <span style="font-weight: bold;">meta HTML code</span>.<br>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
The type "fieldset" is not allowed here.<br>
|
||||||
|
|
||||||
|
The <span style="font-style: italic;">name</span> 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.<br>
|
||||||
|
|
||||||
|
<span style="font-weight: bold;"></span><br>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>2.1.26. checkSelfServiceSettings</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<table border="0" cellpadding="2" cellspacing="2">
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">function checkSelfServiceSettings($options)</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
Checks if the self service settings are valid.<br>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<span style="font-weight: bold;">$options:</span> is an hash array
|
||||||
|
(option name => value) that contains the input. The option values
|
||||||
|
are all arrays containing one or more elements.<br>
|
||||||
|
<br>
|
||||||
|
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).<br>
|
||||||
|
|
||||||
|
If no errors occured the function returns an empty array.<br>
|
||||||
|
|
||||||
|
<span style="font-weight: bold;"></span><br>
|
||||||
|
|
||||||
|
|
||||||
<span style="font-weight: bold;"><br>
|
<span style="font-weight: bold;"><br>
|
||||||
<br>
|
<br>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue