diff --git a/lam/docs/devel/mod_index.htm b/lam/docs/devel/mod_index.htm index 84b9c84f..4d6d0fd4 100644 --- a/lam/docs/devel/mod_index.htm +++ b/lam/docs/devel/mod_index.htm @@ -47,7 +47,10 @@ existing modules.

2. Configuration options


-

3. Advanced upload options

+

3. Advanced upload options

+
+

4. Defining the RDN

+

diff --git a/lam/docs/devel/mod_rdn.htm b/lam/docs/devel/mod_rdn.htm new file mode 100644 index 00000000..e5986e8e --- /dev/null +++ b/lam/docs/devel/mod_rdn.htm @@ -0,0 +1,59 @@ + + + + Module HowTo - Defining the RDN + + + +
+

Module HowTo - Defining the RDN
+

+

+Every LDAP DN starts with a RDN (relative DN). This is the value of a +LDAP attribute. Users usually use "uid", groups use "cn".
+You can provide a list of suitable RDN attributes for your module and +give them a priority, too.
+
+
+
You will need to implement the function get_RDNAttributes() or use meta['RDN'].
+
+Example:
+
+The posixAccount module +offers to create accounts with DNs uid=foo,dc=.... and cn=foo,dc=...
+The uid attribute has a higher priority as it is the usual attribute +for Unix accounts.
+
+ + + + + + +
    /**
+    * Returns meta data that is interpreted by parent +class
+    *
+    * @return array array with meta data
+    */
+    function +get_metaData() {
+        $return = array();
+        // RDN attributes
+        $return["RDN"] = array("uid" +=> "normal", "cn" => "low");
+        [...]
+
+
+
+
+ +

+
+
+ + diff --git a/lam/docs/devel/mod_upload2.htm b/lam/docs/devel/mod_upload2.htm new file mode 100644 index 00000000..6e253c6a --- /dev/null +++ b/lam/docs/devel/mod_upload2.htm @@ -0,0 +1,122 @@ + + + + Module HowTo - Advanced upload options + + + +
+

Module HowTo - Advanced upload options
+

+

+The ieee802Device module only +needs the basic upload functions for its functionality.
+However there are more possibilities for the modules to control the +file upload.
+
+

+

1. Module order
+

+Your module might depend on the input values of another module. In this +case you probably want that your module is called as the second one.
+
+You can define dependencies to other modules with the function get_uploadPreDepends() or meta['upload_preDepends'].
+
+Example:
+
+The sambaGroupMapping module +needs the group name to set the default displayName. Therefore it depends +on the posixGroup module
+
+ + + + + + +
    /**
+    * Returns meta data that is interpreted by parent +class
+    *
+    * @return array array with meta data
+    */
+    function +get_metaData() {
+        $return = array();
+        // upload dependencies
+        $return['upload_preDepends'] = +array('posixGroup');
+        [...]
+
+
+
+

2. Upload post actions
+

+If your module does not only create an account but relates the account +with other existing LDAP entries you can do these modifications after +the account was created.
+This is useful for adding users to groups or setting quotas.
+
+You have to implement the function doUploadPostActions() +in your module. Since post actions are very special there is no meta data for this.
+
+Example:
+
+The posixAccount module +offers to put the user account in additional groups. This is done in +the post actions.
+
+ + + + + + +
    /**
+    * This function executes one post upload action.
+    *
+    * @param array $data array containing one account in +each element
+    * @param array $ids array(<column_name> => +<column number>)
+    * @param array $failed list of accounts which were +not created successfully
+    * @param array $temp variable to store temporary +data between two post actions
+    * @return array current status
+    * <br> array (
+    * <br>  'status' => 'finished' | +'inProgress'
+    * <br>  'progress' => 0..100
+    * <br>  'errors' => array (<array +of parameters for StatusMessage>)
+    * <br> )
+    */
+    function doUploadPostActions($data, $ids, +$failed, &$temp) {
+         [...]
+    }
+
+
+Please make sure that the actions in one call of doUploadPostActions() are not very +time consuming (only one LDAP operation). Your function will be called +repeatedly until you give back the status "finished".
+This allows LAM to avoid running longer than the maximum execution time +by sending meta refreshes to the browser.
+ +

+
+
+ +