Merge pull request #8407 from joseplluis/develop
FIX: add contact permission on contact box
This commit is contained in:
commit
22210446da
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
|
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,7 +21,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/boxes/box_contacts.php
|
* \file htdocs/core/boxes/box_contacts.php
|
||||||
* \ingroup societes
|
* \ingroup contacts
|
||||||
* \brief Module to show box of contacts
|
* \brief Module to show box of contacts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
|
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
|
|
||||||
$this->hidden=! ($user->rights->societe->lire);
|
$this->hidden=! ($user->rights->societe->lire && $user->rights->societe->contact->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,7 +76,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedContacts",$max));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedContacts",$max));
|
||||||
|
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire && $user->rights->societe->contact->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
|
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
|
||||||
$sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile";
|
$sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile";
|
||||||
@ -170,7 +171,6 @@ class box_contacts extends ModeleBoxes
|
|||||||
'text' => $langs->trans("ReadPermissionNotAllowed")
|
'text' => $langs->trans("ReadPermissionNotAllowed")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user