Fix: bad rights
This commit is contained in:
parent
4aa8d0eb0c
commit
74c1fa2263
@ -78,18 +78,20 @@ if (! empty($project_ref) && ! empty($withproject))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$permission=($user->rights->projet->creer || $user->rights->projet->all->creer);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
if ($action == 'setnote_public' && ! empty($permission))
|
||||||
{
|
{
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
else if ($action == 'setnote_private' && ! empty($permission))
|
||||||
{
|
{
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
@ -203,7 +205,6 @@ if ($object->id > 0)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$colwidth=30;
|
$colwidth=30;
|
||||||
$permission=($user->rights->projet->creer || $user->rights->projet->all->creer);
|
|
||||||
$moreparam=$param;
|
$moreparam=$param;
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user