summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--kolab-webadmin.spec.in2
-rw-r--r--php/admin/include/ldap.class.php6
-rw-r--r--www/admin/administrator/admin.php10
-rw-r--r--www/admin/administrator/index.php4
-rw-r--r--www/admin/maintainer/index.php6
-rw-r--r--www/admin/maintainer/maintainer.php14
-rw-r--r--www/admin/user/index.php4
8 files changed, 24 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index 5de0ec1..9388d9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.57)
-m4_define(_VERSION,0.3.1)
+m4_define(_VERSION,0.3.2)
AC_INIT([kolab-webadmin],[_VERSION],[kolab-devel@kolab.org])
AC_CONFIG_SRCDIR(php/admin/include/ldap.class.php)
AC_CONFIG_AUX_DIR(.)
diff --git a/kolab-webadmin.spec.in b/kolab-webadmin.spec.in
index c684d82..bf28f38 100644
--- a/kolab-webadmin.spec.in
+++ b/kolab-webadmin.spec.in
@@ -42,7 +42,7 @@ Source0: kolab-webadmin-%{version}.tar.gz
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 2.1.0
-PreReq: OpenPKG, openpkg >= 2.1.0, kolab
+PreReq: OpenPKG, openpkg >= 2.1.0, kolab >= 1.9.1-20040820
PreReq: apache >= 1.3.31-2.1.0, apache::with_gdbm_ndbm = yes, apache::with_mod_auth_ldap = yes, apache::with_mod_dav = yes, apache::with_mod_php = yes, apache::with_mod_php_gdbm = yes, apache::with_mod_php_gettext = yes, apache::with_mod_php_imap = yes, apache::with_mod_php_openldap = yes, apache::with_mod_php_xml = yes, apache::with_mod_ssl = yes
PreReq: php-smarty >= 2.6.3
AutoReq: no
diff --git a/php/admin/include/ldap.class.php b/php/admin/include/ldap.class.php
index 0deb709..154b720 100644
--- a/php/admin/include/ldap.class.php
+++ b/php/admin/include/ldap.class.php
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright (c) 2004 KlarÃ��¿½ï¿½Â¤lvdalens Datakonsult AB
+ * Copyright (c) 2004 KlarÃ��¿½ï¿½Â¿Â½Ã¯Â¿Â½Ã��¤lvdalens Datakonsult AB
*
* Written by Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
*
@@ -236,9 +236,9 @@ class KolabLDAP {
if ($dn) {
$group = 'user';
$filter = '(member='.$this->escape($dn).')';
- $result = $this->search( 'cn=maintainer,'.$_SESSION['base_dn'], $filter);
+ $result = $this->search( 'cn=maintainer,cn=internal,'.$_SESSION['base_dn'], $filter);
if (ldap_count_entries($this->connection, $result) > 0) $group = 'maintainer';
- $result = $this->search( 'cn=admin,'.$_SESSION["base_dn"], $filter);
+ $result = $this->search( 'cn=admin,cn=internal,'.$_SESSION["base_dn"], $filter);
if (ldap_count_entries($this->connection, $result) > 0) $group = 'admin';
if ($result) $this->freeSearchResult();
}
diff --git a/www/admin/administrator/admin.php b/www/admin/administrator/admin.php
index 9f6865c..f38b861 100644
--- a/www/admin/administrator/admin.php
+++ b/www/admin/administrator/admin.php
@@ -189,7 +189,7 @@ switch( $action ) {
if ($action == "save") {
if (!$errors) {
- if (!empty($ldap_object['cn'])) $newdn = "cn=".$ldap_object['cn'].",".$domain_dn;
+ if (!empty($ldap_object['cn'])) $newdn = "cn=".$ldap_object['cn'].",cn=internal,".$domain_dn;
else $newdn = $dn;
if (!$visible && !strstr($newdn,$dn_add)) {
list($cn,$rest) = split(',', $newdn, 2);
@@ -209,7 +209,7 @@ switch( $action ) {
}
if( !$errors ) {
// Update admin group
- $groupdn = 'cn=admin,'.$domain_dn;
+ $groupdn = 'cn=admin,cn=internal,'.$domain_dn;
if( !ldap_mod_delete($ldap->connection,$groupdn,
array( 'member' => $dn ) ) ) {
$errors[] = _("LDAP Error: Could not remove old group entry $dn: ")
@@ -241,14 +241,14 @@ switch( $action ) {
} else {
// firstsave
if (!$errors) {
- $dn = "cn=".$ldap_object['cn'].",".$domain_dn;
+ $dn = "cn=".$ldap_object['cn'].",cn=internal,".$domain_dn;
debug("Calling ldap_add with dn=$dn");
// Add object to db
if ($dn && !ldap_add($ldap->connection, $dn, $ldap_object))
array_push($errors, _("LDAP Error: could not add object $dn: ").ldap_error($ldap->connection));
// Add object to admin group
- if( $dn && !ldap_mod_add($ldap->connection, 'cn=admin,'.$domain_dn,
+ if( $dn && !ldap_mod_add($ldap->connection, 'cn=admin,cn=internal,'.$domain_dn,
array( 'member' => $dn ) ) ) {
array_push($errors, _("LDAP Error: could not add object $dn to maintainer group: ").ldap_error($ldap->connection));
}
@@ -303,7 +303,7 @@ switch( $action ) {
array_push($errors, _("Error: you need administrative permissions to delete administrators"));
if (!$errors) {
- if(!ldap_mod_del($ldap->connection, 'cn=admin,'.domain_dn(), array('member' => $dn ) )) {
+ if(!ldap_mod_del($ldap->connection, 'cn=admin,cn=internal,'.domain_dn(), array('member' => $dn ) )) {
$errors[] = _("LDAP Error: Could not remove $dn from admin group: ")
.ldap_error($ldap->connection);
}
diff --git a/www/admin/administrator/index.php b/www/admin/administrator/index.php
index 7f75325..228ce16 100644
--- a/www/admin/administrator/index.php
+++ b/www/admin/administrator/index.php
@@ -30,10 +30,10 @@ if( !$errors ) {
if (isset($_SESSION['base_dn'])) $base_dn = $_SESSION['base_dn'];
else $base_dn = 'k=kolab';
- $maintainers = $ldap->groupMembers( $base_dn, 'admin' );
+ $maintainers = $ldap->groupMembers( "cn=internal,$base_dn", 'admin' );
$filter = "(&(cn=*)(objectclass=inetOrgPerson)(uid=*)(sn=*))";
- $result = ldap_list($ldap->connection, $base_dn, $filter, array( 'uid', 'sn', 'cn', 'kolabdeleteflag' ));
+ $result = ldap_search($ldap->connection, $base_dn, $filter, array( 'uid', 'sn', 'cn', 'kolabdeleteflag' ));
if( $result ) {
$title = _('Manage Administrators (').count($maintainers)._(' Administrators)');
diff --git a/www/admin/maintainer/index.php b/www/admin/maintainer/index.php
index bf129b7..94c6c10 100644
--- a/www/admin/maintainer/index.php
+++ b/www/admin/maintainer/index.php
@@ -1,6 +1,6 @@
<?php
/*
- (c) 2004 Klarälvdalens Datakonsult AB
+ (c) 2004 KlarÃ��¤lvdalens Datakonsult AB
This program is Free Software under the GNU General Public License (>=v2).
Read the file COPYING that comes with this packages for details.
@@ -37,10 +37,10 @@ if( !$errors ) {
if (isset($_SESSION['base_dn'])) $base_dn = $_SESSION['base_dn'];
else $base_dn = 'k=kolab';
- $maintainers = $ldap->groupMembers( $base_dn, 'maintainer' );
+ $maintainers = $ldap->groupMembers( "cn=internal,$base_dn", 'maintainer' );
$filter = "(&(cn=*)(objectclass=inetOrgPerson)(uid=*)(sn=*))";
- $result = ldap_list($ldap->connection, $base_dn, $filter, array( 'uid', 'sn', 'cn', 'kolabdeleteflag' ));
+ $result = ldap_search($ldap->connection, $base_dn, $filter, array( 'uid', 'sn', 'cn', 'kolabdeleteflag' ));
if( $result ) {
$title = _('Manage Maintainers (').count($maintainers)._(' Maintainers)');
diff --git a/www/admin/maintainer/maintainer.php b/www/admin/maintainer/maintainer.php
index f04d5c7..b9336b9 100644
--- a/www/admin/maintainer/maintainer.php
+++ b/www/admin/maintainer/maintainer.php
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright (c) 2004 Klarälvdalens Datakonsult AB
+ * Copyright (c) 2004 KlarÃ��¿½ï¿½Â¤lvdalens Datakonsult AB
*
* Written by Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
*
@@ -208,7 +208,7 @@ switch( $action ) {
if ($action == "save") {
if (!$errors) {
- if (!empty($ldap_object['cn'])) $newdn = "cn=".$ldap_object['cn'].",".$domain_dn;
+ if (!empty($ldap_object['cn'])) $newdn = "cn=".$ldap_object['cn'].",cn=internal,".$domain_dn;
else $newdn = $dn;
if (!$visible && !strstr($newdn,$dn_add)) {
list($cn,$rest) = split(',', $newdn, 2);
@@ -230,7 +230,7 @@ switch( $action ) {
}
if( !$errors ) {
// Update maintainer group
- $groupdn = 'cn=maintainer,'.$domain_dn;
+ $groupdn = 'cn=maintainer,cn=internal,'.$domain_dn;
if( !ldap_mod_delete($ldap->connection,$groupdn,
array( 'member' => $dn ) ) ) {
$errors[] = _("LDAP Error: Could not remove old group entry $dn: ")
@@ -262,11 +262,11 @@ switch( $action ) {
} else {
// firstsave
if (!$errors) {
- $dn = "cn=".$ldap_object['cn'].",".$domain_dn;
+ $dn = "cn=".$ldap_object['cn'].",cn=internal,".$domain_dn;
debug("Calling ldap_add with dn=$dn");
if ($dn && !ldap_add($ldap->connection, $dn, $ldap_object))
- array_push($errors, _("LDAP Error: could not add object $dn_ ").ldap_error($ldap->connection));
- if( $dn && !ldap_mod_add($ldap->connection, 'cn=maintainer,'.$domain_dn,
+ array_push($errors, _("LDAP Error: could not add object $dn: ").ldap_error($ldap->connection));
+ if( $dn && !ldap_mod_add($ldap->connection, 'cn=maintainer,cn=internal,'.$domain_dn,
array( 'member' => $dn ) ) ) {
array_push($errors, _("LDAP Error: could not add object $dn to maintainer group: ")
.ldap_error($ldap->connection));
@@ -322,7 +322,7 @@ switch( $action ) {
array_push($errors, _("Error: you need administrative permissions to delete users"));
if (!$errors) {
- if(!ldap_mod_del($ldap->connection, 'cn=maintainer,'.domain_dn(), array('member' => $dn ) )) {
+ if(!ldap_mod_del($ldap->connection, 'cn=maintainer,cn=internal,'.domain_dn(), array('member' => $dn ) )) {
$errors[] = _("LDAP Error: Could not remove $dn from maintainer group: ")
.ldap_error($ldap->connection);
}
diff --git a/www/admin/user/index.php b/www/admin/user/index.php
index 87b2fb4..e303b9f 100644
--- a/www/admin/user/index.php
+++ b/www/admin/user/index.php
@@ -37,8 +37,8 @@ if( !$errors ) {
if (isset($_SESSION['base_dn'])) $base_dn = $_SESSION['base_dn'];
else $base_dn = 'k=kolab';
- $privmembers = array_merge( $ldap->groupMembers( $base_dn, 'admin' ),
- $ldap->groupMembers( $base_dn, 'maintainer' ) );
+ $privmembers = array_merge( $ldap->groupMembers( "cn=internal,$base_dn", 'admin' ),
+ $ldap->groupMembers( "cn=internal,$base_dn", 'maintainer' ) );
$userfilter = "cn=*";
$filterattr = $_REQUEST['filterattr'];