FIX counter of permissions in badge was wrong
This commit is contained in:
parent
e4e085e332
commit
3c1d7bfbf0
@ -749,6 +749,7 @@ class User extends CommonObject
|
|||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::clearrights reset user->rights");
|
dol_syslog(get_class($this)."::clearrights reset user->rights");
|
||||||
$this->rights='';
|
$this->rights='';
|
||||||
|
$this->nb_rights=0;
|
||||||
$this->all_permissions_are_loaded=false;
|
$this->all_permissions_are_loaded=false;
|
||||||
$this->_tab_loaded=array();
|
$this->_tab_loaded=array();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,6 +97,9 @@ if (empty($reshook)) {
|
|||||||
$user->getrights();
|
$user->getrights();
|
||||||
$menumanager->loadMenu();
|
$menumanager->loadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$object->clearrights();
|
||||||
|
$object->getrights();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delrights' && $caneditperms) {
|
if ($action == 'delrights' && $caneditperms) {
|
||||||
@ -110,6 +113,9 @@ if (empty($reshook)) {
|
|||||||
$user->getrights();
|
$user->getrights();
|
||||||
$menumanager->loadMenu();
|
$menumanager->loadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$object->clearrights();
|
||||||
|
$object->getrights();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,9 +272,9 @@ if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->ad
|
|||||||
if ($caneditperms)
|
if ($caneditperms)
|
||||||
{
|
{
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td align="center" class="nowrap">';
|
||||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All")."</a>";
|
print '<a class="reposition commonlink" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&module=allmodules">'.$langs->trans("All")."</a>";
|
||||||
print '/';
|
print '/';
|
||||||
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None")."</a>";
|
print '<a class="reposition commonlink" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&entity='.$entity.'&module=allmodules">'.$langs->trans("None")."</a>";
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="center" width="24"> </td>';
|
print '<td align="center" width="24"> </td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user