2
0
forked from Wavyzz/dolibarr

Merge pull request #24961 from frederic34/2023_06_05

use user hasRight
This commit is contained in:
Laurent Destailleur
2023-06-07 18:53:51 +02:00
committed by GitHub
88 changed files with 142 additions and 144 deletions

View File

@@ -3298,7 +3298,7 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
$htmllink .= '?chat" alt="'.$langs->trans("Chat").' '.$value.'" title="'.dol_escape_htmltag($langs->trans("Chat").' '.$value).'">';
$htmllink .= '<img class="paddingleft" src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
$htmllink .= '</a>';
if (($cid || $socid) && isModEnabled('agenda') && $user->rights->agenda->myactions->create) {
if (($cid || $socid) && isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) {
$addlink = 'AC_SKYPE';
$link = '';
if (!empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) {
@@ -3634,7 +3634,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
}
}
//if (($cid || $socid) && isModEnabled('agenda') && $user->rights->agenda->myactions->create)
//if (($cid || $socid) && isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create'))
if (isModEnabled('agenda') && $user->hasRight("agenda", "myactions", "create")) {
$type = 'AC_TEL';
$link = '';