Defined undocumented parameters

This commit is contained in:
Deon George 2009-07-08 23:24:43 +10:00
parent 5080e204cf
commit 8c46ecf6c9
5 changed files with 159 additions and 2 deletions

View File

@ -131,16 +131,35 @@ if (! preg_match('/^([0-9]+\.?)+/',app_version())) {
if (count($_SESSION[APPCONFIG]->untested()))
system_message(array(
'title'=>'Untested configuration paramaters',
'title'=>'Untested configuration parameters',
'body'=>sprintf('The following parameters have not been tested. If you have configured these parameters, and they are working as expected, please let the developers know, so that they can be removed from this message.<br/><small>%s</small>',implode(', ',$_SESSION[APPCONFIG]->untested())),
'type'=>'info','special'=>true));
$server = $_SESSION[APPCONFIG]->getServer(get_request('server_id','REQUEST'));
if (count($server->untested()))
system_message(array(
'title'=>'Untested server configuration paramaters',
'title'=>'Untested server configuration parameters',
'body'=>sprintf('The following parameters have not been tested. If you have configured these parameters, and they are working as expected, please let the developers know, so that they can be removed from this message.<br/><small>%s</small>',implode(', ',$server->untested())),
'type'=>'info','special'=>true));
if (count($server->undocumented()) || count($_SESSION[APPCONFIG]->undocumented())) {
$body = '';
$site = 'http://phpldapadmin.sourceforge.net/wiki/index.php';
foreach ($server->undocumented() as $param)
$body .= sprintf('<a href="%s/Ldapserver:%s">%s</a>, ',$site,preg_replace('/\./',':',$param),$param);
$body = preg_replace('/, $/','',$body);
$body .= '<br/><br/>';
foreach ($_SESSION[APPCONFIG]->undocumented() as $param)
$body .= sprintf('<a href="%s/config:%s">%s</a>, ',$site,preg_replace('/\./',':',$param),$param);
$body = preg_replace('/, $/','',$body);
system_message(array(
'title'=>'Undocumented PLA configuration parameters',
'body'=>sprintf('The following parameters need to be documented:<br/><small>%s</small>',$body),
'type'=>'info','special'=>true));
}
}
include './cmd.php';

View File

@ -47,10 +47,12 @@ class Config {
*/
$this->default->appearance['anonymous_bind_implies_read_only'] = array(
'desc'=>'Display as read only if user logs in with anonymous bind',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['attr_display_order'] = array(
'desc'=>'Custom order to display attributes',
'undocumented'=>true,
'default'=>array());
/*
@ -60,15 +62,18 @@ class Config {
*/
$this->default->appearance['compress'] = array(
'desc'=>'Compress Output',
'undocumented'=>true,
'untested'=>true,
'default'=>false);
$this->default->appearance['control_icons'] = array(
'desc'=>'Show the control as icons or text',
'undocumented'=>true,
'default'=>false);
$this->default->appearance['custom_templates_only'] = array(
'desc'=>'Only display the custom templates.',
'undocumented'=>true,
'default'=>false);
$this->default->appearance['date'] = array(
@ -77,14 +82,17 @@ class Config {
$this->default->appearance['date_attrs'] = array(
'desc'=>'Array of attributes that should show a jscalendar',
'undocumented'=>true,
'default'=>array('shadowExpire'=>'%es','shadowLastChange'=>'%es'));
$this->default->appearance['date_attrs_showtime'] = array(
'desc'=>'Array of attributes that should show a the time when showing the jscalendar',
'undocumented'=>true,
'default'=>array(''));
$this->default->appearance['disable_default_template'] = array(
'desc'=>'Disabled the Default Template',
'undocumented'=>true,
'default'=>false);
$this->default->appearance['disable_default_leaf'] = array(
@ -93,18 +101,22 @@ class Config {
$this->default->appearance['friendly_attrs'] = array(
'desc'=>'Friendly names for attributes',
'undocumented'=>true,
'default'=>array());
$this->default->appearance['hide_attrs'] = array(
'desc'=>'Hide attributes from display',
'undocumented'=>true,
'default'=>array());
$this->default->appearance['hide_attrs_exempt'] = array(
'desc'=>'Group DN, where membership will exempt the users from hide_attrs',
'undocumented'=>true,
'default'=>null);
$this->default->appearance['hide_debug_info'] = array(
'desc'=>'Hide the features that may provide sensitive debugging information to the browser',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['hide_template_warning'] = array(
@ -120,10 +132,12 @@ class Config {
*/
$this->default->appearance['language'] = array(
'desc'=>'Language',
'undocumented'=>true,
'default'=>'auto');
$this->default->appearance['max_add_attrs'] = array(
'desc'=>'Maximum number of attrs to show in the add attr form',
'undocumented'=>true,
'default'=>10);
/**
@ -132,6 +146,7 @@ class Config {
*/
$this->default->appearance['multi_line_attributes'] = array(
'desc'=>'Attributes to show as multiline attributes',
'undocumented'=>true,
'default'=>array('postalAddress','homePostalAddress','personalSignature','description','mailReplyText'));
/**
@ -139,6 +154,7 @@ class Config {
*/
$this->default->appearance['multi_line_syntax_oids'] = array(
'desc'=>'Attributes to show as multiline attributes',
'undocumented'=>true,
'default'=>array(
// octet string syntax OID:
'1.3.6.1.4.1.1466.115.121.1.40',
@ -151,10 +167,12 @@ class Config {
*/
$this->default->appearance['obfuscate_password_display'] = array(
'desc'=>'Obfuscate the display of passwords',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['page_title'] = array(
'desc'=>'Change the page title to this text',
'undocumented'=>true,
'default'=>'');
$this->default->appearance['rdn_all_attrs'] = array(
@ -179,26 +197,32 @@ class Config {
$this->default->appearance['show_hints'] = array(
'desc'=>'Show helpful hints',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['show_top_create'] = array(
'desc'=>'Show a additional create link on the top of the list if there are more than 10 entries',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['show_schema_link'] = array(
'desc'=>'Show the schema link for each attribute',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['show_attribute_notes'] = array(
'desc'=>'Show notes for each attribute',
'undocumented'=>true,
'default'=>true);
$this->default->appearance['stylesheet'] = array(
'desc'=>'Style sheet to use',
'undocumented'=>true,
'default'=>'style.css');
$this->default->appearance['theme'] = array(
'desc'=>'Which theme to use',
'undocumented'=>true,
'default'=>'default');
$this->default->appearance['timezone'] = array(
@ -240,14 +264,17 @@ class Config {
*/
$this->default->appearance['tree_display_format'] = array(
'desc'=>'LDAP attribute to show in the tree',
'undocumented'=>true,
'default'=>array('%rdn'));
$this->default->appearance['tree_height'] = array(
'desc'=>'Pixel height of the tree browser',
'undocumented'=>true,
'default'=>null);
$this->default->appearance['tree_width'] = array(
'desc'=>'Pixel width of the tree browser',
'undocumented'=>true,
'default'=>null);
/** Tree display filter
@ -255,41 +282,50 @@ class Config {
*/
$this->default->appearance['tree_filter'] = array(
'desc'=>'LDAP search filter for the tree entries',
'undocumented'=>true,
'default'=>'(objectClass=*)');
## Caching
$this->default->cache['schema'] = array(
'desc'=>'Cache Schema Activity',
'undocumented'=>true,
'default'=>true);
$this->default->cache['query'] = array(
'desc'=>'Cache Query Configuration',
'undocumented'=>true,
'default'=>true);
$this->default->cache['query_time'] = array(
'desc'=>'Cache the query configuration for atleast this amount of time in seconds',
'undocumented'=>true,
'default'=>5);
$this->default->cache['template'] = array(
'desc'=>'Cache Template Configuration',
'undocumented'=>true,
'default'=>true);
$this->default->cache['template_time'] = array(
'desc'=>'Cache the template configuration for atleast this amount of time in seconds',
'undocumented'=>true,
'default'=>60);
$this->default->cache['tree'] = array(
'desc'=>'Cache Browser Tree',
'undocumented'=>true,
'default'=>true);
/** Confirm actions
*/
$this->default->confirm['create'] = array(
'desc'=>'Confirm creation actions',
'undocumented'=>true,
'default'=>true);
$this->default->confirm['update'] = array(
'desc'=>'Confirm update actions',
'undocumented'=>true,
'default'=>true);
/** Commands
@ -307,6 +343,7 @@ class Config {
$this->default->commands['script'] = array(
'desc'=>'Define scripts availability',
'undocumented'=>true,
'default'=> array(
'add_attr_form' => true,
'add_oclass_form' => true,
@ -367,39 +404,48 @@ class Config {
*/
@$this->default->deref['export'] = array(
'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_NEVER);
@$this->default->deref['search'] = array(
'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_ALWAYS);
@$this->default->deref['tree'] = array(
'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_NEVER);
@$this->default->deref['view'] = array(
'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_NEVER);
## Debug Attributes
$this->default->debug['level'] = array(
'desc'=>'Debug level verbosity',
'undocumented'=>true,
'default'=>0);
$this->default->debug['syslog'] = array(
'desc'=>'Whether to send debug messages to syslog',
'undocumented'=>true,
'default'=>false);
$this->default->debug['file'] = array(
'desc'=>'Name of file to send debug output to',
'undocumented'=>true,
'default'=>null);
$this->default->debug['addr'] = array(
'desc'=>'IP address of client to provide debugging info.',
'undocumented'=>true,
'default'=>null);
$this->default->debug['append'] = array(
'desc'=>'Whether to append to the debug file, or create it fresh each time',
'undocumented'=>true,
'default'=>true);
## Temp Directories
@ -408,11 +454,13 @@ class Config {
*/
$this->default->jpeg['tmpdir'] = array(
'desc'=>'Temporary directory for jpegPhoto data',
'undocumented'=>true,
'default'=>'/tmp');
## Mass update commands
$this->default->mass['enabled'] = array(
'desc'=>'Are mass update commands enabled',
'undocumented'=>true,
'default'=>true);
## Modify members feature
@ -422,6 +470,7 @@ class Config {
*/
$this->default->modify_member['filter'] = array(
'desc'=>'Search filter for member searches',
'undocumented'=>true,
'default'=>'(objectclass=Person)');
/**
@ -431,6 +480,7 @@ class Config {
*/
$this->default->modify_member['groupattr'] = array(
'desc'=>'Group member attributes',
'undocumented'=>true,
'default'=>array('member','uniqueMember','memberUid'));
/**
@ -439,6 +489,7 @@ class Config {
*/
$this->default->modify_member['attr'] = array(
'desc'=>'Default attribute that is added to the group member attribute',
'undocumented'=>true,
'default'=>'dn');
/**
@ -447,6 +498,7 @@ class Config {
*/
$this->default->modify_member['posixattr'] = array(
'desc'=>'Contents of the group member attribute',
'undocumented'=>true,
'default'=>'uid');
/**
@ -455,6 +507,7 @@ class Config {
*/
$this->default->modify_member['posixfilter'] = array(
'desc'=>'Search filter for posixmember searches',
'undocumented'=>true,
'default'=>'(uid=*)');
/**
@ -463,6 +516,7 @@ class Config {
*/
$this->default->modify_member['posixgroupattr'] = array(
'desc'=>'posixGroup member attribute',
'undocumented'=>true,
'default'=>'memberUid');
## Session Attributes
@ -471,14 +525,17 @@ class Config {
*/
$this->default->session['blowfish'] = array(
'desc'=>'Blowfish key to encrypt cookie details',
'undocumented'=>true,
'default'=>null);
$this->default->session['memorylimit'] = array(
'desc'=>'Set the PHP memorylimit warning threshold.',
'undocumented'=>true,
'default'=>24);
$this->default->session['timelimit'] = array(
'desc'=>'Set the PHP timelimit.',
'undocumented'=>true,
'default'=>30);
/** Cookie Time
@ -487,6 +544,7 @@ class Config {
*/
$this->default->session['cookie_time'] = array(
'desc'=>'Time in seconds for the life of cookies',
'undocumented'=>true,
'default'=>0);
/**
@ -507,26 +565,32 @@ class Config {
## Password Generation
$this->default->password['length'] = array(
'desc'=>'Length of autogenerated password',
'undocumented'=>true,
'default'=>8);
$this->default->password['numbers'] = array(
'desc'=>'Number of numbers required in the password',
'undocumented'=>true,
'default'=>2);
$this->default->password['lowercase'] = array(
'desc'=>'Number of lowercase letters required in the password',
'undocumented'=>true,
'default'=>2);
$this->default->password['uppercase'] = array(
'desc'=>'Number of uppercase letters required in the password',
'undocumented'=>true,
'default'=>2);
$this->default->password['punctuation'] = array(
'desc'=>'Number of punctuation letters required in the password',
'undocumented'=>true,
'default'=>2);
$this->default->password['use_similar'] = array(
'desc'=>'Whether to use similiar characters',
'undocumented'=>true,
'default'=>true);
$this->default->password['no_random_crypt_salt'] = array(
@ -540,10 +604,12 @@ class Config {
*/
$this->default->search['display'] = array(
'desc'=>'Display a list or table of search results',
'undocumented'=>true,
'default'=>'list');
$this->default->search['size_limit'] = array(
'desc'=>'Limit the size of searchs on the search page',
'undocumented'=>true,
'default'=>50);
/**
@ -552,10 +618,12 @@ class Config {
*/
$this->default->search['result_attributes'] = array(
'desc'=>'List of attributes to display in each search result entry',
'undocumented'=>true,
'default'=>array('cn','sn','uid','postalAddress','telephoneNumber'));
$this->default->search['time_limit'] = array(
'desc'=>'Maximum time to allow unlimited size_limit searches to the ldap server',
'undocumented'=>true,
'default'=>120);
}
@ -614,6 +682,20 @@ class Config {
return $result;
}
/**
* Return the undocumented config items
*/
public function undocumented() {
$result = array();
foreach ($this->default as $option => $details)
foreach ($details as $param => $values)
if (isset($values['undocumented']) && $values['undocumented'])
array_push($result,sprintf('%s.%s',$option,$param));
return $result;
}
/**
* Function to check and warn about any unusual defined variables.
*/

View File

@ -112,6 +112,20 @@ abstract class DS {
return $result;
}
/**
* Return the undocumented config items
*/
public function undocumented() {
$result = array();
foreach ($this->default as $option => $details)
foreach ($details as $param => $values)
if (isset($values['undocumented']) && $values['undocumented'])
array_push($result,sprintf('%s.%s',$option,$param));
return $result;
}
/**
* Get the name of this datastore
*/
@ -466,33 +480,40 @@ class Datastore {
$this->default->server['id'] = array(
'desc'=>'Server ID',
'undocumented'=>true,
'default'=>null);
$this->default->server['name'] = array(
'desc'=>'Server name',
'undocumented'=>true,
'default'=>null);
# Connectivity Info
$this->default->server['host'] = array(
'desc'=>'Host Name',
'undocumented'=>true,
'default'=>'127.0.0.1');
$this->default->server['port'] = array(
'desc'=>'Port Number',
'undocumented'=>true,
'default'=>null);
# Read or write only access
$this->default->server['read_only'] = array(
'desc'=>'Server is in READ ONLY mode',
'undocumented'=>true,
'default'=>false);
$this->default->server['visible'] = array(
'desc'=>'Whether this server is visible',
'undocumented'=>true,
'default'=>true);
# Authentication Information
$this->default->login['auth_type'] = array(
'desc'=>'Authentication Type',
'undocumented'=>true,
'default'=>'session');
/*
@ -512,23 +533,28 @@ class Datastore {
$this->default->login['auth_text'] = array(
'desc'=>'Text to show at the login prompt',
'undocumented'=>true,
'default'=>null);
$this->default->login['bind_id'] = array(
'desc'=>'User Login ID to bind to this DS',
'undocumented'=>true,
'default'=>null);
$this->default->login['bind_pass'] = array(
'desc'=>'User Login Password to bind to this DS',
'undocumented'=>true,
'default'=>null);
$this->default->login['timeout'] = array(
'desc'=>'Session timout in seconds',
'undocumented'=>true,
'default'=>session_cache_expire()-1);
# Prefix for custom pages
$this->default->custom['pages_prefix'] = array(
'desc'=>'Prefix name for custom pages',
'undocumented'=>true,
'default'=>'custom_');
}

View File

@ -46,27 +46,33 @@ class ldap extends DS {
* definitions when reading the schema.*/
$this->default->server['schema_oclass_default'] = array(
'desc'=>'When reading the schema, and it doesnt specify objectClass type, default it to this',
'undocumented'=>true,
'default'=>null);
$this->default->server['base'] = array(
'desc'=>'LDAP Base DNs',
'undocumented'=>true,
'default'=>array());
$this->default->server['tls'] = array(
'desc'=>'Connect using TLS',
'undocumented'=>true,
'default'=>false);
# Login Details
$this->default->login['attr'] = array(
'desc'=>'Attribute to use to find the users DN',
'undocumented'=>true,
'default'=>'dn');
$this->default->login['anon_bind'] = array(
'desc'=>'Enable anonymous bind logins',
'undocumented'=>true,
'default'=>true);
$this->default->login['allowed_dns'] = array(
'desc'=>'Limit logins to users who match any of the following LDAP filters',
'undocumented'=>true,
'default'=>array());
$this->default->login['base'] = array(
@ -84,36 +90,43 @@ class ldap extends DS {
# SASL configuration
$this->default->server['sasl'] = array(
'desc'=>'Use SASL authentication when binding LDAP server',
'undocumented'=>true,
'default'=>false);
$this->default->sasl['mech'] = array(
'desc'=>'SASL mechanism used while binding LDAP server',
'untested'=>true,
'undocumented'=>true,
'default'=>'PLAIN');
$this->default->sasl['realm'] = array(
'desc'=>'SASL realm name',
'untested'=>true,
'undocumented'=>true,
'default'=>null);
$this->default->sasl['authz_id'] = array(
'desc'=>'SASL authorization id',
'untested'=>true,
'undocumented'=>true,
'default'=>null);
$this->default->sasl['authz_id_regex'] = array(
'desc'=>'SASL authorization id PCRE regular expression',
'untested'=>true,
'undocumented'=>true,
'default'=>null);
$this->default->sasl['authz_id_replacement'] = array(
'desc'=>'SASL authorization id PCRE regular expression replacement string',
'untested'=>true,
'undocumented'=>true,
'default'=>null);
$this->default->sasl['props'] = array(
'desc'=>'SASL properties',
'untested'=>true,
'undocumented'=>true,
'default'=>null);
}

View File

@ -21,10 +21,12 @@ class ldap_pla extends ldap {
$this->default->appearance['password_hash'] = array(
'desc'=>'Default HASH to use for passwords',
'undocumented'=>true,
'default'=>'md5');
$this->default->appearance['show_create'] = array(
'desc'=>'Whether to show the "Create new Entry here" in the tree browser',
'undocumented'=>true,
'default'=>true);
$this->default->login['fallback_dn'] = array(
@ -33,27 +35,33 @@ class ldap_pla extends ldap {
$this->default->query['disable_default'] = array(
'desc'=>'Configuration to disable the default query template',
'undocumented'=>true,
'default'=>false);
$this->default->query['custom_only'] = array(
'desc'=>'Configuration to force the usage of custom query templates',
'undocumented'=>true,
'default'=>false);
$this->default->server['branch_rename'] = array(
'desc'=>'Enable renaming of branches',
'undocumented'=>true,
'default'=>false);
$this->default->server['custom_attrs'] = array(
'desc'=>'Custom operational attributes to be treated as regular attributes',
'undocumented'=>true,
'default'=>array(''));
$this->default->server['custom_sys_attrs'] = array(
'desc'=>'Custom operational attributes to be treated as internal attributes',
'undocumented'=>true,
'default'=>array('+'));
# This was added in case the LDAP server doesnt provide them with a base +,* query.
$this->default->server['root_dse_attributes'] = array(
'desc'=>'RootDSE attributes for use when displaying server info',
'undocumented'=>true,
'default'=>array(
'namingContexts',
'subschemaSubentry',
@ -88,38 +96,47 @@ class ldap_pla extends ldap {
# Settings for auto_number
$this->default->auto_number['enable'] = array(
'desc'=>'Enable the AUTO UID feature',
'undocumented'=>true,
'default'=>true);
$this->default->auto_number['mechanism'] = array(
'desc'=>'Mechanism to use to search for automatic numbers',
'undocumented'=>true,
'default'=>'search');
$this->default->auto_number['search_base'] = array(
'desc'=>'Base DN to use for search mechanisms',
'undocumented'=>true,
'default'=>null);
$this->default->auto_number['min'] = array(
'desc'=>'Minimum number to start with',
'undocumented'=>true,
'default'=>array('uidNumber'=>1000,'gidNumber'=>500));
$this->default->auto_number['dn'] = array(
'desc'=>'DN to use when evaluating numbers',
'undocumented'=>true,
'default'=>null);
$this->default->auto_number['pass'] = array(
'desc'=>'Password for DN to use when evaluating numbers',
'undocumented'=>true,
'default'=>null);
$this->default->unique['attrs'] = array(
'desc'=>'Attributes to check for uniqueness before allowing updates',
'undocumented'=>true,
'default'=>array('mail','uid','uidNumber'));
$this->default->unique['dn'] = array(
'desc'=>'DN to use when evaluating attribute uniqueness',
'undocumented'=>true,
'default'=>null);
$this->default->unique['pass'] = array(
'desc'=>'Password for DN to use when evaluating attribute uniqueness',
'undocumented'=>true,
'default'=>null);
}