Compare commits

...

2 Commits

Author SHA1 Message Date
Deon George
88f3c8faa7 Update already documented 2010-11-16 18:05:15 +11:00
Deon George
8c46ecf6c9 Defined undocumented parameters 2010-11-16 18:05:14 +11:00
5 changed files with 97 additions and 2 deletions

View File

@ -131,16 +131,35 @@ if (! preg_match('/^([0-9]+\.?)+/',app_version())) {
if (count($_SESSION[APPCONFIG]->untested())) if (count($_SESSION[APPCONFIG]->untested()))
system_message(array( 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())), '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)); 'type'=>'info','special'=>true));
$server = $_SESSION[APPCONFIG]->getServer(get_request('server_id','REQUEST')); $server = $_SESSION[APPCONFIG]->getServer(get_request('server_id','REQUEST'));
if (count($server->untested())) if (count($server->untested()))
system_message(array( 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())), '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)); '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'; include './cmd.php';

View File

@ -65,6 +65,7 @@ class Config {
$this->default->appearance['control_icons'] = array( $this->default->appearance['control_icons'] = array(
'desc'=>'Show the control as icons or text', 'desc'=>'Show the control as icons or text',
'undocumented'=>true,
'default'=>false); 'default'=>false);
$this->default->appearance['custom_templates_only'] = array( $this->default->appearance['custom_templates_only'] = array(
@ -307,6 +308,7 @@ class Config {
$this->default->commands['script'] = array( $this->default->commands['script'] = array(
'desc'=>'Define scripts availability', 'desc'=>'Define scripts availability',
'undocumented'=>true,
'default'=> array( 'default'=> array(
'add_attr_form' => true, 'add_attr_form' => true,
'add_oclass_form' => true, 'add_oclass_form' => true,
@ -379,6 +381,7 @@ class Config {
@$this->default->deref['view'] = array( @$this->default->deref['view'] = array(
'desc'=>'', 'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_NEVER); 'default'=>LDAP_DEREF_NEVER);
## Debug Attributes ## Debug Attributes
@ -422,6 +425,7 @@ class Config {
*/ */
$this->default->modify_member['filter'] = array( $this->default->modify_member['filter'] = array(
'desc'=>'Search filter for member searches', 'desc'=>'Search filter for member searches',
'undocumented'=>true,
'default'=>'(objectclass=Person)'); 'default'=>'(objectclass=Person)');
/** /**
@ -431,6 +435,7 @@ class Config {
*/ */
$this->default->modify_member['groupattr'] = array( $this->default->modify_member['groupattr'] = array(
'desc'=>'Group member attributes', 'desc'=>'Group member attributes',
'undocumented'=>true,
'default'=>array('member','uniqueMember','memberUid')); 'default'=>array('member','uniqueMember','memberUid'));
/** /**
@ -439,6 +444,7 @@ class Config {
*/ */
$this->default->modify_member['attr'] = array( $this->default->modify_member['attr'] = array(
'desc'=>'Default attribute that is added to the group member attribute', 'desc'=>'Default attribute that is added to the group member attribute',
'undocumented'=>true,
'default'=>'dn'); 'default'=>'dn');
/** /**
@ -447,6 +453,7 @@ class Config {
*/ */
$this->default->modify_member['posixattr'] = array( $this->default->modify_member['posixattr'] = array(
'desc'=>'Contents of the group member attribute', 'desc'=>'Contents of the group member attribute',
'undocumented'=>true,
'default'=>'uid'); 'default'=>'uid');
/** /**
@ -455,6 +462,7 @@ class Config {
*/ */
$this->default->modify_member['posixfilter'] = array( $this->default->modify_member['posixfilter'] = array(
'desc'=>'Search filter for posixmember searches', 'desc'=>'Search filter for posixmember searches',
'undocumented'=>true,
'default'=>'(uid=*)'); 'default'=>'(uid=*)');
/** /**
@ -463,6 +471,7 @@ class Config {
*/ */
$this->default->modify_member['posixgroupattr'] = array( $this->default->modify_member['posixgroupattr'] = array(
'desc'=>'posixGroup member attribute', 'desc'=>'posixGroup member attribute',
'undocumented'=>true,
'default'=>'memberUid'); 'default'=>'memberUid');
## Session Attributes ## Session Attributes
@ -475,10 +484,12 @@ class Config {
$this->default->session['memorylimit'] = array( $this->default->session['memorylimit'] = array(
'desc'=>'Set the PHP memorylimit warning threshold.', 'desc'=>'Set the PHP memorylimit warning threshold.',
'undocumented'=>true,
'default'=>24); 'default'=>24);
$this->default->session['timelimit'] = array( $this->default->session['timelimit'] = array(
'desc'=>'Set the PHP timelimit.', 'desc'=>'Set the PHP timelimit.',
'undocumented'=>true,
'default'=>30); 'default'=>30);
/** Cookie Time /** Cookie Time
@ -487,6 +498,7 @@ class Config {
*/ */
$this->default->session['cookie_time'] = array( $this->default->session['cookie_time'] = array(
'desc'=>'Time in seconds for the life of cookies', 'desc'=>'Time in seconds for the life of cookies',
'undocumented'=>true,
'default'=>0); 'default'=>0);
/** /**
@ -507,26 +519,32 @@ class Config {
## Password Generation ## Password Generation
$this->default->password['length'] = array( $this->default->password['length'] = array(
'desc'=>'Length of autogenerated password', 'desc'=>'Length of autogenerated password',
'undocumented'=>true,
'default'=>8); 'default'=>8);
$this->default->password['numbers'] = array( $this->default->password['numbers'] = array(
'desc'=>'Number of numbers required in the password', 'desc'=>'Number of numbers required in the password',
'undocumented'=>true,
'default'=>2); 'default'=>2);
$this->default->password['lowercase'] = array( $this->default->password['lowercase'] = array(
'desc'=>'Number of lowercase letters required in the password', 'desc'=>'Number of lowercase letters required in the password',
'undocumented'=>true,
'default'=>2); 'default'=>2);
$this->default->password['uppercase'] = array( $this->default->password['uppercase'] = array(
'desc'=>'Number of uppercase letters required in the password', 'desc'=>'Number of uppercase letters required in the password',
'undocumented'=>true,
'default'=>2); 'default'=>2);
$this->default->password['punctuation'] = array( $this->default->password['punctuation'] = array(
'desc'=>'Number of punctuation letters required in the password', 'desc'=>'Number of punctuation letters required in the password',
'undocumented'=>true,
'default'=>2); 'default'=>2);
$this->default->password['use_similar'] = array( $this->default->password['use_similar'] = array(
'desc'=>'Whether to use similiar characters', 'desc'=>'Whether to use similiar characters',
'undocumented'=>true,
'default'=>true); 'default'=>true);
$this->default->password['no_random_crypt_salt'] = array( $this->default->password['no_random_crypt_salt'] = array(
@ -540,10 +558,12 @@ class Config {
*/ */
$this->default->search['display'] = array( $this->default->search['display'] = array(
'desc'=>'Display a list or table of search results', 'desc'=>'Display a list or table of search results',
'undocumented'=>true,
'default'=>'list'); 'default'=>'list');
$this->default->search['size_limit'] = array( $this->default->search['size_limit'] = array(
'desc'=>'Limit the size of searchs on the search page', 'desc'=>'Limit the size of searchs on the search page',
'undocumented'=>true,
'default'=>50); 'default'=>50);
/** /**
@ -552,10 +572,12 @@ class Config {
*/ */
$this->default->search['result_attributes'] = array( $this->default->search['result_attributes'] = array(
'desc'=>'List of attributes to display in each search result entry', 'desc'=>'List of attributes to display in each search result entry',
'undocumented'=>true,
'default'=>array('cn','sn','uid','postalAddress','telephoneNumber')); 'default'=>array('cn','sn','uid','postalAddress','telephoneNumber'));
$this->default->search['time_limit'] = array( $this->default->search['time_limit'] = array(
'desc'=>'Maximum time to allow unlimited size_limit searches to the ldap server', 'desc'=>'Maximum time to allow unlimited size_limit searches to the ldap server',
'undocumented'=>true,
'default'=>120); 'default'=>120);
} }
@ -614,6 +636,20 @@ class Config {
return $result; 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. * Function to check and warn about any unusual defined variables.
*/ */

View File

@ -112,6 +112,20 @@ abstract class DS {
return $result; 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 * Get the name of this datastore
*/ */
@ -466,10 +480,12 @@ class Datastore {
$this->default->server['id'] = array( $this->default->server['id'] = array(
'desc'=>'Server ID', 'desc'=>'Server ID',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->server['name'] = array( $this->default->server['name'] = array(
'desc'=>'Server name', 'desc'=>'Server name',
'undocumented'=>true,
'default'=>null); 'default'=>null);
# Connectivity Info # Connectivity Info
@ -479,15 +495,18 @@ class Datastore {
$this->default->server['port'] = array( $this->default->server['port'] = array(
'desc'=>'Port Number', 'desc'=>'Port Number',
'undocumented'=>true,
'default'=>null); 'default'=>null);
# Read or write only access # Read or write only access
$this->default->server['read_only'] = array( $this->default->server['read_only'] = array(
'desc'=>'Server is in READ ONLY mode', 'desc'=>'Server is in READ ONLY mode',
'undocumented'=>true,
'default'=>false); 'default'=>false);
$this->default->server['visible'] = array( $this->default->server['visible'] = array(
'desc'=>'Whether this server is visible', 'desc'=>'Whether this server is visible',
'undocumented'=>true,
'default'=>true); 'default'=>true);
# Authentication Information # Authentication Information
@ -512,23 +531,28 @@ class Datastore {
$this->default->login['auth_text'] = array( $this->default->login['auth_text'] = array(
'desc'=>'Text to show at the login prompt', 'desc'=>'Text to show at the login prompt',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->login['bind_id'] = array( $this->default->login['bind_id'] = array(
'desc'=>'User Login ID to bind to this DS', 'desc'=>'User Login ID to bind to this DS',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->login['bind_pass'] = array( $this->default->login['bind_pass'] = array(
'desc'=>'User Login Password to bind to this DS', 'desc'=>'User Login Password to bind to this DS',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->login['timeout'] = array( $this->default->login['timeout'] = array(
'desc'=>'Session timout in seconds', 'desc'=>'Session timout in seconds',
'undocumented'=>true,
'default'=>session_cache_expire()-1); 'default'=>session_cache_expire()-1);
# Prefix for custom pages # Prefix for custom pages
$this->default->custom['pages_prefix'] = array( $this->default->custom['pages_prefix'] = array(
'desc'=>'Prefix name for custom pages', 'desc'=>'Prefix name for custom pages',
'undocumented'=>true,
'default'=>'custom_'); 'default'=>'custom_');
} }

View File

@ -46,6 +46,7 @@ class ldap extends DS {
* definitions when reading the schema.*/ * definitions when reading the schema.*/
$this->default->server['schema_oclass_default'] = array( $this->default->server['schema_oclass_default'] = array(
'desc'=>'When reading the schema, and it doesnt specify objectClass type, default it to this', 'desc'=>'When reading the schema, and it doesnt specify objectClass type, default it to this',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->server['base'] = array( $this->default->server['base'] = array(
@ -89,31 +90,37 @@ class ldap extends DS {
$this->default->sasl['mech'] = array( $this->default->sasl['mech'] = array(
'desc'=>'SASL mechanism used while binding LDAP server', 'desc'=>'SASL mechanism used while binding LDAP server',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>'PLAIN'); 'default'=>'PLAIN');
$this->default->sasl['realm'] = array( $this->default->sasl['realm'] = array(
'desc'=>'SASL realm name', 'desc'=>'SASL realm name',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->sasl['authz_id'] = array( $this->default->sasl['authz_id'] = array(
'desc'=>'SASL authorization id', 'desc'=>'SASL authorization id',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->sasl['authz_id_regex'] = array( $this->default->sasl['authz_id_regex'] = array(
'desc'=>'SASL authorization id PCRE regular expression', 'desc'=>'SASL authorization id PCRE regular expression',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->sasl['authz_id_replacement'] = array( $this->default->sasl['authz_id_replacement'] = array(
'desc'=>'SASL authorization id PCRE regular expression replacement string', 'desc'=>'SASL authorization id PCRE regular expression replacement string',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->sasl['props'] = array( $this->default->sasl['props'] = array(
'desc'=>'SASL properties', 'desc'=>'SASL properties',
'untested'=>true, 'untested'=>true,
'undocumented'=>true,
'default'=>null); 'default'=>null);
} }

View File

@ -21,10 +21,12 @@ class ldap_pla extends ldap {
$this->default->appearance['password_hash'] = array( $this->default->appearance['password_hash'] = array(
'desc'=>'Default HASH to use for passwords', 'desc'=>'Default HASH to use for passwords',
'undocumented'=>true,
'default'=>'md5'); 'default'=>'md5');
$this->default->appearance['show_create'] = array( $this->default->appearance['show_create'] = array(
'desc'=>'Whether to show the "Create new Entry here" in the tree browser', 'desc'=>'Whether to show the "Create new Entry here" in the tree browser',
'undocumented'=>true,
'default'=>true); 'default'=>true);
$this->default->login['fallback_dn'] = array( $this->default->login['fallback_dn'] = array(
@ -33,27 +35,33 @@ class ldap_pla extends ldap {
$this->default->query['disable_default'] = array( $this->default->query['disable_default'] = array(
'desc'=>'Configuration to disable the default query template', 'desc'=>'Configuration to disable the default query template',
'undocumented'=>true,
'default'=>false); 'default'=>false);
$this->default->query['custom_only'] = array( $this->default->query['custom_only'] = array(
'desc'=>'Configuration to force the usage of custom query templates', 'desc'=>'Configuration to force the usage of custom query templates',
'undocumented'=>true,
'default'=>false); 'default'=>false);
$this->default->server['branch_rename'] = array( $this->default->server['branch_rename'] = array(
'desc'=>'Enable renaming of branches', 'desc'=>'Enable renaming of branches',
'undocumented'=>true,
'default'=>false); 'default'=>false);
$this->default->server['custom_attrs'] = array( $this->default->server['custom_attrs'] = array(
'desc'=>'Custom operational attributes to be treated as regular attributes', 'desc'=>'Custom operational attributes to be treated as regular attributes',
'undocumented'=>true,
'default'=>array('')); 'default'=>array(''));
$this->default->server['custom_sys_attrs'] = array( $this->default->server['custom_sys_attrs'] = array(
'desc'=>'Custom operational attributes to be treated as internal attributes', 'desc'=>'Custom operational attributes to be treated as internal attributes',
'undocumented'=>true,
'default'=>array('+')); 'default'=>array('+'));
# This was added in case the LDAP server doesnt provide them with a base +,* query. # This was added in case the LDAP server doesnt provide them with a base +,* query.
$this->default->server['root_dse_attributes'] = array( $this->default->server['root_dse_attributes'] = array(
'desc'=>'RootDSE attributes for use when displaying server info', 'desc'=>'RootDSE attributes for use when displaying server info',
'undocumented'=>true,
'default'=>array( 'default'=>array(
'namingContexts', 'namingContexts',
'subschemaSubentry', 'subschemaSubentry',
@ -96,6 +104,7 @@ class ldap_pla extends ldap {
$this->default->auto_number['search_base'] = array( $this->default->auto_number['search_base'] = array(
'desc'=>'Base DN to use for search mechanisms', 'desc'=>'Base DN to use for search mechanisms',
'undocumented'=>true,
'default'=>null); 'default'=>null);
$this->default->auto_number['min'] = array( $this->default->auto_number['min'] = array(