Skip to content

Commit

Permalink
Fix user rights overrided by user group rights
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-ph authored and atm-ph committed Jul 11, 2018
1 parent aeb5f5e commit 0c252d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/user/class/user.class.php
Expand Up @@ -804,7 +804,8 @@ function getrights($moduletag='')
else
{
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;
}

}
Expand Down

0 comments on commit 0c252d9

Please sign in to comment.