Merge pull request #9094 from atm-ph/fix_7.0_getrights
Fix user rights overrided by user group rights
This commit is contained in:
commit
cb0553c3bf
@ -804,7 +804,8 @@ class User extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(empty($this->rights->$module->$perms)) $this->nb_rights++;
|
if(empty($this->rights->$module->$perms)) $this->nb_rights++;
|
||||||
$this->rights->$module->$perms = 1;
|
// if we have already define a subperm like this $this->rights->$module->level1->level2 with llx_user_rights, we don't want override level1 because the level2 can be not define on user group
|
||||||
|
if (!is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user