Fix: Bad permissions
This commit is contained in:
parent
00395c87a8
commit
4fa99a86ed
@ -47,15 +47,14 @@ if ($id > 0) $object->fetch($id);
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Actions */
|
/* Actions */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
if ($action == 'setnote_public' && $user->rights->societe->creer)
|
||||||
if ($action == 'setnote_public' && $user->rights->propale->creer)
|
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
|
||||||
if ($result < 0) setEventMessage($object->error,'errors');
|
if ($result < 0) setEventMessage($object->error,'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote_private' && $user->rights->propale->creer)
|
else if ($action == 'setnote_private' && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user