Skip to content
Snippets Groups Projects
Commit 74c1fa22 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: bad rights

parent 4aa8d0eb
No related branches found
No related tags found
No related merge requests found
......@@ -78,18 +78,20 @@ if (! empty($project_ref) && ! empty($withproject))
}
}
$permission=($user->rights->projet->creer || $user->rights->projet->all->creer);
/*
* 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));
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));
if ($result < 0) dol_print_error($db,$object->error);
......@@ -203,7 +205,6 @@ if ($object->id > 0)
print '<br>';
$colwidth=30;
$permission=($user->rights->projet->creer || $user->rights->projet->all->creer);
$moreparam=$param;
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment