Merge pull request #18772 from javieralapps4up/14.0

Update main.inc.php
This commit is contained in:
Laurent Destailleur 2021-09-21 19:10:39 +02:00 committed by GitHub
commit 1ade905daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1043,6 +1043,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;