2 commits - lib/api lib/Auth.php lib/ext
Aleksander Machniak
machniak at kolabsys.com
Thu Sep 27 12:02:23 CEST 2012
lib/Auth.php | 5 +++++
lib/api/kolab_api_service_form_value.php | 8 ++++++++
lib/ext/Net/LDAP3.php | 9 ++++-----
3 files changed, 17 insertions(+), 5 deletions(-)
New commits:
commit f4a7ba6685f9569e333efa3bdfbabc8aafe9ae04
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Sep 27 12:00:51 2012 +0200
Add select_options_attribute()
diff --git a/lib/Auth.php b/lib/Auth.php
index 94ba753..e1f754b 100644
--- a/lib/Auth.php
+++ b/lib/Auth.php
@@ -405,4 +405,9 @@ class Auth {
{
return $this->auth_instance()->user_info($userdata);
}
+
+ public function ldap_schema_attributes($object_classes)
+ {
+ return $this->auth_instance()->attributes_allowed($object_classes);
+ }
}
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 22cc294..4b3430f 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -785,6 +785,14 @@ class kolab_api_service_form_value extends kolab_api_service
return $classes;
}
+ private function select_options_attribute($postdata, $attribs = array())
+ {
+ $auth = Auth::get_instance();
+ $list = $auth->ldap_schema_attributes($postdata['classes']);
+
+ return $list;
+ }
+
private function select_options_ou($postdata, $attribs = array())
{
$auth = Auth::get_instance();
commit 6dbf51de92cfd2d5e75a9fb981b528bf1de29dae
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Sep 27 11:52:38 2012 +0200
Replace lost $this->conf->get() with $this->config_get()
diff --git a/lib/ext/Net/LDAP3.php b/lib/ext/Net/LDAP3.php
index 31247a6..54ebc12 100644
--- a/lib/ext/Net/LDAP3.php
+++ b/lib/ext/Net/LDAP3.php
@@ -304,7 +304,6 @@ class Net_LDAP3
}
return array('may' => $may, 'must' => $must, 'super' => $superclasses);
-
}
/**
@@ -1618,7 +1617,7 @@ class Net_LDAP3
private function init_schema()
{
- $this->_ldap_uri = $this->conf->get('ldap_uri');
+ $this->_ldap_uri = $this->config_get('ldap_uri');
$this->_ldap_server = parse_url($this->_ldap_uri, PHP_URL_HOST);
$this->_ldap_port = parse_url($this->_ldap_uri, PHP_URL_PORT);
$this->_ldap_scheme = parse_url($this->_ldap_uri, PHP_URL_SCHEME);
@@ -1630,8 +1629,8 @@ class Net_LDAP3
'port' => $this->_ldap_port,
'tls' => FALSE,
'version' => 3,
- 'binddn' => $this->conf->get('bind_dn'),
- 'bindpw' => $this->conf->get('bind_pw')
+ 'binddn' => $this->config_get('bind_dn'),
+ 'bindpw' => $this->config_get('bind_pw')
);
$_ldap_schema_cache_cfg = array(
@@ -1647,7 +1646,7 @@ class Net_LDAP3
// TODO: We should learn what LDAP tech. we're running against.
// Perhaps with a scope base objectclass recognize rootdse entry
- $schema_root_dn = $this->conf->get('schema_root_dn');
+ $schema_root_dn = $this->config_get('schema_root_dn');
if (!$schema_root_dn) {
$_schema = $_ldap->schema();
}
More information about the commits
mailing list