LDAP: some inline documentation
This commit is contained in:
parent
14bc6f8c6c
commit
e8db1e884e
|
@ -264,6 +264,9 @@ class Connection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return returns an array that maps internal variable names to database fields
|
||||||
|
*/
|
||||||
private function getConfigTranslationArray() {
|
private function getConfigTranslationArray() {
|
||||||
static $array = array('ldap_host'=>'ldapHost', 'ldap_port'=>'ldapPort', 'ldap_backup_host'=>'ldapBackupHost', 'ldap_backup_port'=>'ldapBackupPort', 'ldap_override_main_server' => 'ldapOverrideMainServer', 'ldap_dn'=>'ldapAgentName', 'ldap_agent_password'=>'ldapAgentPassword', 'ldap_base'=>'ldapBase', 'ldap_base_users'=>'ldapBaseUsers', 'ldap_base_groups'=>'ldapBaseGroups', 'ldap_userlist_filter'=>'ldapUserFilter', 'ldap_login_filter'=>'ldapLoginFilter', 'ldap_group_filter'=>'ldapGroupFilter', 'ldap_display_name'=>'ldapUserDisplayName', 'ldap_group_display_name'=>'ldapGroupDisplayName',
|
static $array = array('ldap_host'=>'ldapHost', 'ldap_port'=>'ldapPort', 'ldap_backup_host'=>'ldapBackupHost', 'ldap_backup_port'=>'ldapBackupPort', 'ldap_override_main_server' => 'ldapOverrideMainServer', 'ldap_dn'=>'ldapAgentName', 'ldap_agent_password'=>'ldapAgentPassword', 'ldap_base'=>'ldapBase', 'ldap_base_users'=>'ldapBaseUsers', 'ldap_base_groups'=>'ldapBaseGroups', 'ldap_userlist_filter'=>'ldapUserFilter', 'ldap_login_filter'=>'ldapLoginFilter', 'ldap_group_filter'=>'ldapGroupFilter', 'ldap_display_name'=>'ldapUserDisplayName', 'ldap_group_display_name'=>'ldapGroupDisplayName',
|
||||||
|
|
||||||
|
@ -303,6 +306,10 @@ class Connection {
|
||||||
return $this->configured;
|
return $this->configured;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief saves the current Configuration in the database
|
||||||
|
ingle parameters
|
||||||
|
*/
|
||||||
public function saveConfiguration() {
|
public function saveConfiguration() {
|
||||||
$trans = array_flip($this->getConfigTranslationArray());
|
$trans = array_flip($this->getConfigTranslationArray());
|
||||||
foreach($this->config as $key => $value) {
|
foreach($this->config as $key => $value) {
|
||||||
|
|
|
@ -69,6 +69,11 @@ class Helper {
|
||||||
return $prefixes;
|
return $prefixes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief deletes a given saved LDAP/AD server configuration.
|
||||||
|
* @param string the configuration prefix of the config to delete
|
||||||
|
* @return bool true on success, false otherweise
|
||||||
|
*/
|
||||||
static public function deleteServerConfiguration($prefix) {
|
static public function deleteServerConfiguration($prefix) {
|
||||||
//just to be on the safe side
|
//just to be on the safe side
|
||||||
\OCP\User::checkAdminUser();
|
\OCP\User::checkAdminUser();
|
||||||
|
|
Loading…
Reference in New Issue