diff --git a/lam/help/help.inc b/lam/help/help.inc index 69b8f546..60cae7f0 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -187,6 +187,10 @@ $helpArray = array ( "Text" => _("This is a workaround for Active Directory. Enable it if you get messages about size limit exceeded.")), "267" => array ("Headline" => _('Template'), "Text" => _('Please select the template for the new server profile. You can either select an existing server profile or use one of the built-in templates.')), + "270" => array ("Headline" => _('Bind user and password'), + "Text" => _('Please enter the DN and password to use for all jobs.')), + "271" => array ("Headline" => _('Database type'), + "Text" => _('Please select the type of database to use for job data.')), // 300 - 399 // profile editor, file upload "301" => array ("Headline" => _("RDN identifier"), diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 7dd83a65..7040ba7e 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2014 Roland Gruber + Copyright (C) 2003 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -514,6 +514,13 @@ class LAMConfig { /** mail body for password reset mails */ private $lamProMailText = ''; + + /** LDAP user for jobs */ + private $jobsBindUser = null; + /** LDAP password for jobs */ + private $jobsBindPassword = null; + /** database for jobs */ + private $jobsDatabase = null; /** List of all settings in config file */ private $settings = array("ServerURL", "useTLS", "followReferrals", 'pagedResults', "Passwd", "Admins", "treesuffix", @@ -521,7 +528,7 @@ class LAMConfig { "modules", "activeTypes", "types", "tools", "accessLevel", 'loginMethod', 'loginSearchSuffix', 'loginSearchFilter', 'searchLimit', 'lamProMailFrom', 'lamProMailReplyTo', 'lamProMailSubject', 'lamProMailText', 'lamProMailIsHTML', 'lamProMailAllowAlternateAddress', 'httpAuthentication', 'loginSearchDN', - 'loginSearchPassword', 'timeZone'); + 'loginSearchPassword', 'timeZone', 'jobsBindUser', 'jobsBindPassword', 'jobsDatabase'); /** @@ -713,6 +720,9 @@ class LAMConfig { if (!in_array("lamProMailIsHTML", $saved)) array_push($file_array, "\n\n# Password mail is HTML\n" . "lamProMailIsHTML: " . $this->lamProMailIsHTML . "\n"); if (!in_array("lamProMailAllowAlternateAddress", $saved)) array_push($file_array, "\n\n# Allow alternate address\n" . "lamProMailAllowAlternateAddress: " . $this->lamProMailAllowAlternateAddress . "\n"); if (!in_array("lamProMailText", $saved)) array_push($file_array, "\n\n# Password mail text\n" . "lamProMailText: " . $this->lamProMailText . "\n"); + if (!in_array("jobsBindPassword", $saved)) array_push($file_array, "\n" . "jobsBindPassword: " . $this->jobsBindPassword . "\n"); + if (!in_array("jobsBindUser", $saved)) array_push($file_array, "\n" . "jobsBindUser: " . $this->jobsBindUser . "\n"); + if (!in_array("jobsDatabase", $saved)) array_push($file_array, "\n" . "jobsDatabase: " . $this->jobsDatabase . "\n"); // check if all module settings were added $m_settings = array_keys($this->moduleSettings); for ($i = 0; $i < sizeof($m_settings); $i++) { @@ -1594,6 +1604,60 @@ class LAMConfig { $this->lamProMailText = implode(LAMConfig::LINE_SEPARATOR, explode("\r\n", $lamProMailText)); } + /** + * Returns the bind user for jobs. + * + * @return String $jobsBindUser bind user + */ + public function getJobsBindUser() { + return $this->jobsBindUser; + } + + /** + * Sets the bind user for jobs. + * + * @param String $jobsBindUser bind user + */ + public function setJobsBindUser($jobsBindUser) { + $this->jobsBindUser = $jobsBindUser; + } + + /** + * Returns the bind password for jobs. + * + * @return String $jobsBindPassword password + */ + public function getJobsBindPassword() { + return $this->jobsBindPassword; + } + + /** + * Sets the bind password for jobs. + * + * @param String $jobsBindPassword password + */ + public function setJobsBindPassword($jobsBindPassword) { + $this->jobsBindPassword = $jobsBindPassword; + } + + /** + * Returns the database type for jobs. + * + * @return String $jobsDatabase database type + */ + public function getJobsDatabase() { + return $this->jobsDatabase; + } + + /** + * Sets the database type for jobs. + * + * @param String $jobsDatabase database type + */ + public function setJobsDatabase($jobsDatabase) { + $this->jobsDatabase = $jobsDatabase; + } + } diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index b145d425..c530087d 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -85,7 +85,7 @@ class Ldap{ * @param string $user user name * @param string $passwd password * @param boolean $allowAnonymous specifies if anonymous binds are allowed - * @return mixed if connect succeeds the server handle is returned, else false + * @return mixed if connect succeeds the 0 is returned, else false or error number */ function connect($user, $passwd, $allowAnonymous=false) { // close any prior connection diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index cdffaf58..415dc2e1 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -226,6 +226,11 @@ table.collapse { background-position: 0px 0px !important; } +.testButton { + background-image: url(../graphics/tests.png) !important; + background-position: 0px 0px !important; +} + .smallPadding span { padding: 0.1em 0.4em !important; }