Fix: Permissions on create actions
This commit is contained in:
parent
f26f0654d0
commit
76e0a7a37b
@ -509,9 +509,12 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
|
||||
print '<tr style="background: #EEEEEE"><td align="left" nowrap="nowrap">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.$month.'&year='.$year.'">'.dol_print_date($curtime,'%a %d').'</a>';
|
||||
print '</td><td align="right" nowrap="nowrap">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).'">';
|
||||
print img_picto($langs->trans("NewAction"),'edit_add.png');
|
||||
print '</a>';
|
||||
if ($user->agenda->myactions->create || $user->agenda->actions->create)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).'">';
|
||||
print img_picto($langs->trans("NewAction"),'edit_add.png');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '<tr height="60"><td valign="top" colspan="2" nowrap="nowrap">'; // Minimum 60px height
|
||||
|
||||
|
||||
@ -732,7 +732,7 @@ class MenuLeft {
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->actions->create));
|
||||
// Calendar
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -701,7 +701,7 @@ class MenuLeft {
|
||||
|
||||
// Actions
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->actions->create));
|
||||
// Calendar
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user