diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 6c790a939a..7df84bdd5f 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -466,10 +466,16 @@ class bocontacts extends socontacts } $owner = $contact['owner']; + // allow the user to edit his own account if (!$owner && $needed == EGW_ACL_EDIT && $contact['account_id'] == $this->user) { return true; } + // dont allow to delete own account (as admin handels it too) + if (!$owner && $needed == EGW_ACL_DELETE && $contact['account_id'] == $this->user) + { + return false; + } return ($this->grants[$owner] & $needed) && (!$contact['private'] || ($this->grants[$owner] & EGW_ACL_PRIVATE) || in_array($owner,$this->memberships)); } diff --git a/addressbook/inc/class.so_ldap.inc.php b/addressbook/inc/class.so_ldap.inc.php index a401af98c8..bd415bb249 100644 --- a/addressbook/inc/class.so_ldap.inc.php +++ b/addressbook/inc/class.so_ldap.inc.php @@ -78,6 +78,10 @@ class so_ldap * @var array */ var $schema2egw = array( + 'posixaccount' => array( + 'account_id' => 'uidnumber', + 'account_lid' => 'uid', + ), 'inetorgperson' => array( 'n_fn' => 'cn', 'n_given' => 'givenname', diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index ad8c9becc1..9380848d2a 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -271,7 +271,8 @@ class uicontacts extends bocontacts { $Ok = $this->delete($id); } - elseif (count($checked) == 1) // delete single account --> redirect to admin + // delete single account --> redirect to admin + elseif (count($checked) == 1 && $contact['account_id']) { $GLOBALS['egw']->redirect_link('/index.php',array( 'menuaction' => 'admin.uiaccounts.delete_user',