mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
fixed rights admin
This commit is contained in:
parent
3ccbf08a09
commit
dcf2a196d4
@ -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);
|
||||
|
@ -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')
|
||||
));
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
<tr bgcolor="{th_bg}" valign="middle" align="center">
|
||||
<td>{sort_cat}<br>{lang_cat_admin}</td>
|
||||
<td>{lang_read}</td>
|
||||
<td>{lang_write}<br>({lang_implies})</td>
|
||||
<td>{lang_write}<br>({lang_implies_read})</td>
|
||||
<td>{lang_calread}</td>
|
||||
<td>{lang_calbook}</td>
|
||||
<td>{lang_calbook}<br>({lang_implies_book})</td>
|
||||
</tr>
|
||||
<!-- BEGIN cat_list -->
|
||||
<tr bgcolor="{tr_color}">
|
||||
|
Loading…
Reference in New Issue
Block a user