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()))
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

@ -65,6 +65,7 @@ class Config {
$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(
@ -307,6 +308,7 @@ class Config {
$this->default->commands['script'] = array(
'desc'=>'Define scripts availability',
'undocumented'=>true,
'default'=> array(
'add_attr_form' => true,
'add_oclass_form' => true,
@ -379,6 +381,7 @@ class Config {
@$this->default->deref['view'] = array(
'desc'=>'',
'undocumented'=>true,
'default'=>LDAP_DEREF_NEVER);
## Debug Attributes
@ -422,6 +425,7 @@ class Config {
*/
$this->default->modify_member['filter'] = array(
'desc'=>'Search filter for member searches',
'undocumented'=>true,
'default'=>'(objectclass=Person)');
/**
@ -431,6 +435,7 @@ class Config {
*/
$this->default->modify_member['groupattr'] = array(
'desc'=>'Group member attributes',
'undocumented'=>true,
'default'=>array('member','uniqueMember','memberUid'));
/**
@ -439,6 +444,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 +453,7 @@ class Config {
*/
$this->default->modify_member['posixattr'] = array(
'desc'=>'Contents of the group member attribute',
'undocumented'=>true,
'default'=>'uid');
/**
@ -455,6 +462,7 @@ class Config {
*/
$this->default->modify_member['posixfilter'] = array(
'desc'=>'Search filter for posixmember searches',
'undocumented'=>true,
'default'=>'(uid=*)');
/**
@ -463,6 +471,7 @@ class Config {
*/
$this->default->modify_member['posixgroupattr'] = array(
'desc'=>'posixGroup member attribute',
'undocumented'=>true,
'default'=>'memberUid');
## Session Attributes
@ -475,10 +484,12 @@ class Config {
$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 +498,7 @@ class Config {
*/
$this->default->session['cookie_time'] = array(
'desc'=>'Time in seconds for the life of cookies',
'undocumented'=>true,
'default'=>0);
/**
@ -507,26 +519,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 +558,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 +572,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 +636,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,10 +480,12 @@ 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
@ -479,15 +495,18 @@ class Datastore {
$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
@ -512,23 +531,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,6 +46,7 @@ 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(
@ -89,31 +90,37 @@ class ldap extends DS {
$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',
@ -96,6 +104,7 @@ class ldap_pla extends ldap {
$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(