diff --git a/resources/inc/class.bo_acl.inc.php b/resources/inc/class.bo_acl.inc.php index 3684a1053b..1b13b4db62 100755 --- a/resources/inc/class.bo_acl.inc.php +++ b/resources/inc/class.bo_acl.inc.php @@ -192,17 +192,18 @@ $admincat = $admin ? $admin : array(); $this->so->remove_location('L' . $cat_id); - reset($this->accounts); - while (list($null,$account) = each($this->accounts)) +// reset($this->accounts); +// while (list($null,$account) = each($this->accounts)) + + foreach($this->accounts as $num => $account) { $account_id = $account['account_id']; - //write implies read - $rights = in_array($account_id,$writecat) ? - (EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE) : - (in_array($account_id,$readcat) ? EGW_ACL_READ : False); + $rights = false; + $rights = in_array($account_id,$readcat) ? ($rights | EGW_ACL_READ) : false; + $rights = in_array($account_id,$writecat) ? ($rights | EGW_ACL_READ | EGW_ACL_ADD | EGW_ACL_EDIT | EGW_ACL_DELETE): $rights; $rights = in_array($account_id,$calreadcat) ? ($rights | EGW_ACL_CALREAD) : $rights; - $rights = in_array($account_id,$calbookcat) ? ($rights | EGW_ACL_DIRECT_BOOKING) : $rights; - $rights = in_array($account_id,$admincat) ? ($rights | EGW_ACL_CAT_ADMIN) : $rights; + $rights = in_array($account_id,$calbookcat) ? ($rights | EGW_ACL_DIRECT_BOOKING | EGW_ACL_CALREAD) : $rights; + $rights = in_array($account_id,$admincat) ? ($rights = 511) : $rights; if ($rights) { $GLOBALS['egw']->acl->add_repository('resources','L'.$cat_id,$account_id,$rights); diff --git a/resources/inc/class.ui_acl.inc.php b/resources/inc/class.ui_acl.inc.php index 0e8be908af..15cba6f37c 100755 --- a/resources/inc/class.ui_acl.inc.php +++ b/resources/inc/class.ui_acl.inc.php @@ -71,9 +71,10 @@ 'lang_done' => lang('Done'), 'lang_read' => lang('Read permissions'), 'lang_write' => lang('Write permissions'), - 'lang_implies' => lang('implies read permission'), + 'lang_implies_read' => lang('implies read permission'), 'lang_calread' => lang('Read Calender permissions'), 'lang_calbook' => lang('Direct booking permissions'), + 'lang_implies_book' => lang('implies booking permission'), 'lang_cat_admin' => lang('Categories admin') )); diff --git a/resources/templates/default/acl.tpl b/resources/templates/default/acl.tpl index d0249bacb2..a9448d5f7d 100755 --- a/resources/templates/default/acl.tpl +++ b/resources/templates/default/acl.tpl @@ -26,9 +26,9 @@