From 0c252d9778774585c232b87a01d47c7c0ca651e9 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 11 Jul 2018 18:09:29 +0200 Subject: [PATCH] Fix user rights overrided by user group rights --- htdocs/user/class/user.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 220892e74b2..e329d77b1b3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -804,7 +804,8 @@ class User extends CommonObject 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; } }