From 153a642b562587ca9232c88d6f2bfa8690458107 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 22 Aug 2006 16:50:32 +0000 Subject: [PATCH] Two new options for the account-selection: - Selectbox with groupmembers (only) - No user-selection at all These two options limit the visibility of other users. There for they should be forced and apply NOT to administrators. --- addressbook/inc/class.socontacts.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.socontacts.inc.php b/addressbook/inc/class.socontacts.inc.php index 90497d4313..49c9aaa011 100755 --- a/addressbook/inc/class.socontacts.inc.php +++ b/addressbook/inc/class.socontacts.inc.php @@ -233,10 +233,16 @@ class socontacts $this->account_extra_search = array('uid'); } } - // add grants for accounts: admin --> everything, everyone --> read - $this->grants[0] = EGW_ACL_READ; // everyone read access + // add grants for accounts: if account_selection not in ('none','groupmembers'): everyone has read access + // ToDo: be more specific for 'groupmembers', they should be able to see the groupmembers + if (!in_array($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'],array('none','groupmembers'))) + { + $this->grants[0] = EGW_ACL_READ; + } + // add account grants for admins if (isset($GLOBALS['egw_info']['user']['apps']['admin'])) // admin rights can be limited by ACL! { + $this->grants[0] = EGW_ACL_READ; // admins always have read-access if (!$GLOBALS['egw']->acl->check('account_access',16,'admin')) $this->grants[0] |= EGW_ACL_EDIT; // no add at the moment if (!$GLOBALS['egw']->acl->check('account_access',4,'admin')) $this->grants[0] |= EGW_ACL_ADD; if (!$GLOBALS['egw']->acl->check('account_access',32,'admin')) $this->grants[0] |= EGW_ACL_DELETE;