updated for new base module meaning
This commit is contained in:
parent
e278195766
commit
b8926fcae6
|
@ -54,9 +54,9 @@ in modules.inc and checked for dependencies/conflicts with <span
|
||||||
style="font-weight: bold; font-style: italic;">check_module_depends()</span>
|
style="font-weight: bold; font-style: italic;">check_module_depends()</span>
|
||||||
and <span style="font-weight: bold; font-style: italic;">check_module_conflicts()</span>.<br>
|
and <span style="font-weight: bold; font-style: italic;">check_module_conflicts()</span>.<br>
|
||||||
<br>
|
<br>
|
||||||
Each account type needs a <span style="font-style: italic;">base module</span>
|
Each account type needs exactly one <span style="font-style: italic;">base
|
||||||
which provides the base of a senseful account. It also provides the
|
module</span>
|
||||||
LDAP search filter for the account lists.<br>
|
which is the base of a account by providing a structural object class.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>Configuration - Save settings (confsave.php):<br>
|
<h2>Configuration - Save settings (confsave.php):<br>
|
||||||
|
|
|
@ -51,7 +51,51 @@ get_metaData() {<br>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>2. Alias name</h2>
|
<h2>2. Base modules<br>
|
||||||
|
</h2>
|
||||||
|
In LDAP every entry needs exactly one <span style="font-style: italic;">structural
|
||||||
|
object class</span>. Therefore all modules which provide a <span
|
||||||
|
style="font-style: italic;">structural object class</span> are marked
|
||||||
|
as <span style="font-weight: bold;">base module</span>.<br>
|
||||||
|
<br>
|
||||||
|
This is done with <span style="font-weight: bold;">is_base_module()</span>
|
||||||
|
or <span style="font-weight: bold;">meta['is_base']</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;">inetOrgPerson</span>
|
||||||
|
module manages the structural object class "inetOrgPerson" and
|
||||||
|
therefore is a <span style="font-weight: bold;">base module</span>.<br>
|
||||||
|
If your module is not a base module you can skip the meta data for
|
||||||
|
this, default is <span style="font-style: italic;">false</span>.<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>
|
||||||
|
// base module<br>
|
||||||
|
<span style="color: rgb(255, 0, 0);">
|
||||||
|
$return["is_base"] = true;</span><br
|
||||||
|
style="color: rgb(255, 0, 0);">
|
||||||
|
return $return;<br>
|
||||||
|
}<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<h2>3. Alias name</h2>
|
||||||
The module name is very limited, therefore every module has an <span
|
The module name is very limited, therefore every module has an <span
|
||||||
style="font-style: italic;">alias name</span>. This <span
|
style="font-style: italic;">alias name</span>. This <span
|
||||||
style="font-style: italic;">alias name</span> has no limitations and
|
style="font-style: italic;">alias name</span> has no limitations and
|
||||||
|
@ -100,7 +144,7 @@ get_metaData() {<br>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>3. Dependencies</h2>
|
<h2>4. Dependencies</h2>
|
||||||
Modules can depend on eachother. This is useful if you need to access
|
Modules can depend on eachother. This is useful if you need to access
|
||||||
attributes from other modules or the managed object classes of your
|
attributes from other modules or the managed object classes of your
|
||||||
module are not structural.<br>
|
module are not structural.<br>
|
||||||
|
@ -148,7 +192,7 @@ array('account'), 'conflicts' => array());</span><br
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h2>4. Messages</h2>
|
<h2>5. Messages</h2>
|
||||||
There are many situations where you will display messages to the user.
|
There are many situations where you will display messages to the user.
|
||||||
The modules should define such messages at a common place to make it
|
The modules should define such messages at a common place to make it
|
||||||
easier to modify them without searching the complete file.<br>
|
easier to modify them without searching the complete file.<br>
|
||||||
|
|
|
@ -83,11 +83,10 @@ sure that there is a general alias for unknown types.<br>
|
||||||
Returns <span style="font-weight: bold;">true</span> if your module is
|
Returns <span style="font-weight: bold;">true</span> if your module is
|
||||||
a base module and otherwise <span style="font-weight: bold;">false</span>.<br>
|
a base module and otherwise <span style="font-weight: bold;">false</span>.<br>
|
||||||
<span style="font-weight: bold;"></span><br>
|
<span style="font-weight: bold;"></span><br>
|
||||||
Every account type needs at least one base module. A base module
|
Every account type needs exactly one base module. A base module manages
|
||||||
defines a full qualified account.<br>
|
a structural object class.<br>
|
||||||
E.g. modules that use the object class posixAccount may be base modules
|
E.g. the inetOrgPerson module is a base module since its object class
|
||||||
as it makes sense to manage these Unix accounts. On the other hand the
|
is structural.<br>
|
||||||
quota module is no base module as it needs posixAccount.<br>
|
|
||||||
<br>
|
<br>
|
||||||
<h3>2.1.4. get_ldap_filter*</h3>
|
<h3>2.1.4. get_ldap_filter*</h3>
|
||||||
<br>
|
<br>
|
||||||
|
@ -115,11 +114,7 @@ The resulting LDAP filter will look like this:
|
||||||
<span style="font-weight: bold;">Example: <span
|
<span style="font-weight: bold;">Example: <span
|
||||||
style="font-style: italic;">return "('or' =>
|
style="font-style: italic;">return "('or' =>
|
||||||
'(objectClass=posixAccount)', 'and' => '(!(uid=*$))')"</span></span><br>
|
'(objectClass=posixAccount)', 'and' => '(!(uid=*$))')"</span></span><br>
|
||||||
<br>
|
<span style="font-weight: bold; color: rgb(255, 0, 0);"></span><br>
|
||||||
<span style="font-weight: bold; color: rgb(255, 0, 0);">This function
|
|
||||||
is only used for base modules. Standard modules do not need to
|
|
||||||
implement it.</span><br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.5. get_RDNAttributes*</h3>
|
<h3>2.1.5. get_RDNAttributes*</h3>
|
||||||
<br>
|
<br>
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
||||||
|
|
Loading…
Reference in New Issue