index 4745fa22ffeef090c14817afa4dc2b8e76ec2a51..6f9df0b45fcf17070a033a4d538a7f4ec65cf0b5 100644 (file)
<?php
<?php
+/*
+ * How to use plugin::plInfo()
+ * ===================
+ *
+ * The function returns a descriptive array of the plugin,
+ * which will then be used by GOsa to populate the plugin, its ACLs,
+ * its properties, its schema requirements aso.
+ *
+ *
+ * The following values can be set:
+ * ================================
+ *
+ * plShortName |-> The name of the plugin in short (e.g. Posix)
+ * | This short-name will be shown for example in the ACL definitions.
+ * |
+ * |
+ * plDescription |-> A descriptive text for the plugin (e.g. User posix account extension)
+ * | This will be shown in the ACL definitions.
+ * |
+ * |
+ * plSelfModify |-> If set to true this plugin allows to set 'self' ACLs.
+ * | For exampe to allow to change the users own password, but not the others.
+ * |
+ * |
+ * plDepends |-> The plugins dependencies to other classes (e.g. sambaAccount requires posixAccount)
+ * |
+ * |
+ * plPriority |-> The priority of the plugin, this influences the ACL listings only.
+ * |
+ * |
+ * plSection |-> The section of this plugin 'administration', 'personal', 'addons'
+ * |
+ * |
+ * plCategory |-> The plugin category this plugins belongs to (e.g. users, groups, departments)
+ * |
+ * |
+ * plRequirements |-> Plugin requirements.
+ * | |
+ * | |-> [activePlugin] The schame checks will only be performed if the given plugin is enabled
+ * | | in the gosa.conf definitions.
+ * | | Defaults to the current class name if empty.
+ * | |
+ * | |-> [ldapSchema] An array of objectClass requirements.
+ * | | Syntax [[objectClass => 'version'], ... ]
+ * | | Version can be emtpy which just checks for the existence of the class.
+ * | |
+ * | |-> [onFailureDisablePlugin] A list of plugins that which will be disabled if the
+ * | requirements couldn't be fillfulled.
+ * |
+ * | ---------------------------------------------
+ * | EXAMPLE:
+ * | ---------------------------------------------
+ * | "plRequirements"=> array(
+ * | 'activePlugin' => 'applicationManagement',
+ * | 'ldapSchema' => array(
+ * | 'gosaObject' => '',
+ * | 'gosaAccount' => '>=2.7',
+ * | 'gosaLockEntry' => '>=2.7',
+ * | 'gosaDepartment' => '>=2.7',
+ * | 'gosaCacheEntry' => '>=2.7',
+ * | 'gosaProperties' => '>=2.7',
+ * | 'gosaConfig' => '>=2.7'
+ * | ),
+ * | 'onFailureDisablePlugin' => array(get_class(), 'someClassName')
+ * | ),
+ * | ---------------------------------------------
+ * |
+ * |
+ * |
+ * plProvidedAcls |-> The ACLs provided by this plugin
+ * |
+ * | ---------------------------------------------
+ * | EXAMPLE:
+ * | ---------------------------------------------
+ * | "plProvidedAcls"=> array(
+ * | 'cn' => _('Name'),
+ * | 'uid' => _('Uid'),
+ * | 'phoneNumber' => _('Phone number')
+ * | ),
+ * | ---------------------------------------------
+ * |
+ * |
+ * |
+ * plProperties |-> Properties used by the plugin.
+ * | Properties which are defined here will be modifyable using the property editor.
+ * | To read properties you can use $config->get_cfg_value(className, propertyName)
+ * |
+ * | ---------------------------------------------
+ * | EXAMPLE:
+ * | ---------------------------------------------
+ * | "plProperties"=> array(
+ * | array(
+ * | "name" => "htaccessAuthentication",
+ * | "type" => "bool",
+ * | "default" => "false",
+ * | "description" => _("A description..."),
+ * | "check" => "gosaProperty::isBool",
+ * | "migrate" => "",
+ * | "group" => "authentification",
+ * | "mandatory" => TRUE
+ * | ),
+ * | ),
+ * | See class_core.inc for a huge amount of examples.
+ */
+
class all extends plugin {
static function plInfo()
class all extends plugin {
static function plInfo()
$list = array('mail' => 'mail','uid' => 'uid');
break;
case 'mailMethod':
$list = array('mail' => 'mail','uid' => 'uid');
break;
case 'mailMethod':
- $list = mailMethod::get_methods();
+ $tmp = mailMethod::get_methods();
+ $list =array();
+ foreach($tmp as $name => $value){
+ $name = preg_replace('/^mailMethod/','', $name);
+ $list[$name] = $value;
+ }
$list[''] = _("None");
break;
case 'language':
$list[''] = _("None");
break;
case 'language':
"plDepends" => array(),
"plPriority" => 0,
"plSection" => array("administration"),
"plDepends" => array(),
"plPriority" => 0,
"plSection" => array("administration"),
+
+ "plRequirements"=> array(
+ 'ldapSchema' => array(
+ 'gosaObject' => '>=2.7',
+ 'gosaAccount' => '>=2.7',
+ 'gosaLockEntry' => '>=2.7',
+ 'gosaDepartment' => '>=2.7',
+ 'gosaCacheEntry' => '>=2.7',
+ 'gosaProperties' => '>=2.7',
+ 'gosaConfig' => '>=2.7'
+ ),
+ 'onFailureDisablePlugin' => array(get_class())
+ ),
+
+
+
"plCategory" => array("all"),
"plProperties" => array(
"plCategory" => array("all"),
"plProperties" => array(
"name" => "htaccessAuthentication",
"type" => "bool",
"default" => "false",
"name" => "htaccessAuthentication",
"type" => "bool",
"default" => "false",
- "description" => _("The 'htaccessAuthentication' variable tells GOsa to use either htaccess authentication or LDAP authentication. This can be used if you want to use i.e. kerberos to authenticate the users."),
+ "description" => _("The 'htaccessAuthentication' variable tells GOsa to use either htaccess authentication or LDAP authentication. This can be used if you want to use i.e. Kerberos to authenticate the users."),
"check" => "gosaProperty::isBool",
"migrate" => "",
"group" => "authentification",
"mandatory" => TRUE),
"check" => "gosaProperty::isBool",
"migrate" => "",
"group" => "authentification",
"mandatory" => TRUE),
+ array(
+ "name" => "statsDatabaseEnabled",
+ "type" => "bool",
+ "default" => "false",
+ "description" => _("Enables/Disables GOSa usage statistics moduls."),
+ "check" => "gosaProperty::isBool",
+ "migrate" => "",
+ "group" => "core",
+ "mandatory" => TRUE),
+
+ array(
+ "name" => "statsDatabaseDirectory",
+ "type" => "path",
+ "default" => "/var/spool/gosa/stats",
+ "description" => _("The database file for GOSa usage statistics."),
+ "check" => "gosaProperty::isWriteablePath",
+ "migrate" => "",
+ "group" => "core",
+ "mandatory" => TRUE),
+
array(
"name" => "logging",
"type" => "bool",
array(
"name" => "logging",
"type" => "bool",
"group" => "password",
"mandatory" => FALSE),
"group" => "password",
"mandatory" => FALSE),
+ array(
+ "name" => "passwordProposalHook",
+ "type" => "command",
+ "default" => "",
+ "description" => _("The 'passwordProposalHook' can be used to let GOsa generate password proposals for you. Whenever you change a password, you can then decide whether to use the proposal or to manually specify a password.")." "._("Here is an example command:")." /usr/bin/apg -n1",
+ "check" => "gosaProperty::isCommand",
+ "migrate" => "",
+ "group" => "password",
+ "mandatory" => FALSE),
+
array(
"name" => "displayErrors",
"type" => "bool",
array(
"name" => "displayErrors",
"type" => "bool",
array(
"name" => "forceGlobals",
array(
"name" => "forceGlobals",
- "type" => "bool",
+ "type" => "noLdap",
"default" => "false",
"description" => _("The 'forceGlobals' statement enables PHP security checks to force register_global settings to be switched off."),
"check" => "gosaProperty::isBool",
"default" => "false",
"description" => _("The 'forceGlobals' statement enables PHP security checks to force register_global settings to be switched off."),
"check" => "gosaProperty::isBool",
array(
"name" => "forceSSL",
array(
"name" => "forceSSL",
- "type" => "bool",
+ "type" => "noLdap",
"default" => "false",
"description" => _("The 'forceSSL' statement enables PHP security checks to force encrypted access to the web interface. GOsa will try to redirect to the same URL - just with https://"),
"check" => "gosaProperty::isBool",
"default" => "false",
"description" => _("The 'forceSSL' statement enables PHP security checks to force encrypted access to the web interface. GOsa will try to redirect to the same URL - just with https://"),
"check" => "gosaProperty::isBool",
array(
"name" => "warnSSL",
array(
"name" => "warnSSL",
- "type" => "bool",
+ "type" => "noLdap",
"default" => "true",
"description" => _("The 'warnSSL' statement enables PHP security checks to detect non encrypted access to the web interface. GOsa will display a warning in this case."),
"check" => "gosaProperty::isBool",
"default" => "true",
"description" => _("The 'warnSSL' statement enables PHP security checks to detect non encrypted access to the web interface. GOsa will display a warning in this case."),
"check" => "gosaProperty::isBool",
array(
"name" => "sessionLifetime",
"type" => "integer",
array(
"name" => "sessionLifetime",
"type" => "integer",
- "default" => 7200,
+ "default" => 600,
"description" => _("The 'sessionLifetime' value defines when a session will expire in seconds. For Debian systems, this will not work because the sessions will be removed by a cron job instead. Please modify the value inside of your php.ini instead."),
"check" => "gosaProperty::isInteger",
"migrate" => "",
"description" => _("The 'sessionLifetime' value defines when a session will expire in seconds. For Debian systems, this will not work because the sessions will be removed by a cron job instead. Please modify the value inside of your php.ini instead."),
"check" => "gosaProperty::isInteger",
"migrate" => "",
"group" => "id",
"mandatory" => FALSE),
"group" => "id",
"mandatory" => FALSE),
+ array(
+ "name" => "gosaRpcServer",
+ "type" => "string",
+ "default" => "",
+ "description" => "The server to use for RPC connections! (http://localhost:8080/rpc), Future GOsa-ng service! If this value is set and not empty GOsa will try to establish a connection!",
+ "check" => "",
+ "migrate" => "",
+ "group" => "rpc",
+ "mandatory" => FALSE),
+
+ array(
+ "name" => "gosaRpcUser",
+ "type" => "string",
+ "default" => "admin",
+ "description" => "Ther username to use for RPC connections! Future GOsa-ng service!",
+ "check" => "",
+ "migrate" => "",
+ "group" => "rpc",
+ "mandatory" => FALSE),
+
+ array(
+ "name" => "gosaRpcPassword",
+ "type" => "string",
+ "default" => "tester",
+ "description" => "Ther password to use for RPC connections! Future GOsa-ng service!",
+ "check" => "",
+ "migrate" => "",
+ "group" => "rpc",
+ "mandatory" => FALSE),
+
array(
"name" => "gosaSupportURI",
"type" => "string",
array(
"name" => "gosaSupportURI",
"type" => "string",