From 1683f46d9bd7142f89cd801ecd07e086f2efcd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 25 Oct 2021 21:21:48 +0200 Subject: [PATCH] backport fix --- htdocs/main.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2e9f0558421..9753f4b3d83 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1042,6 +1042,16 @@ if (!defined('NOLOGIN')) { //Required if advanced permissions are used with MAIN_USE_ADVANCED_PERMS if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + if (empty($user->rights->user->user_advance)) { + $user->rights->user->user_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->self_advance)) { + $user->rights->user->self_advance = new stdClass(); // To avoid warnings + } + if (empty($user->rights->user->group_advance)) { + $user->rights->user->group_advance = new stdClass(); // To avoid warnings + } + $user->rights->user->user_advance->readperms = 1; $user->rights->user->user_advance->write = 1; $user->rights->user->self_advance->readperms = 1;