Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r16533 -r16561 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16533) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16561) @@ -1,6 +1,6 @@ RecallVar('user_id'); + } + + return $user_id == USER_ROOT; + } + + /** * Check current user permissions based on it's group permissions in specified category * * @param string $name permission name Index: branches/5.2.x/core/units/helpers/upload_helper.php =================================================================== diff -u -N -r16513 -r16561 --- branches/5.2.x/core/units/helpers/upload_helper.php (.../upload_helper.php) (revision 16513) +++ branches/5.2.x/core/units/helpers/upload_helper.php (.../upload_helper.php) (revision 16561) @@ -140,7 +140,7 @@ /** @var Session $admin_session */ $admin_session = $this->Application->recallObject('Session.admin'); - if ( $admin_session->RecallVar('user_id') == USER_ROOT ) { + if ( $this->Application->permissionCheckingDisabled($admin_session->RecallVar('user_id')) ) { return true; } Index: branches/5.2.x/core/units/helpers/permissions_helper.php =================================================================== diff -u -N -r16513 -r16561 --- branches/5.2.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 16513) +++ branches/5.2.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 16561) @@ -1,6 +1,6 @@ Application->permissionCheckingDisabled($user_id) ) { return substr($name, -5) == '.deny' || $name == 'SYSTEM_ACCESS.READONLY' ? 0 : 1; } @@ -845,4 +844,4 @@ return 0; } - } \ No newline at end of file + } Index: branches/5.2.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r16554 -r16561 --- branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16554) +++ branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16561) @@ -1,6 +1,6 @@ setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true)); $status_checked = false; - if ( $user_id == USER_ROOT || $this->CheckPermission($event) ) { - // don't autoload item, when user doesn't have view permission + if ( $this->Application->permissionCheckingDisabled($user_id) || $this->CheckPermission($event) ) { + // Don't autoload item, when user doesn't have view permission. $this->LoadItem($event); $status_checked = true; $editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false; $id_from_request = $event->getEventParam(kEvent::FLAG_ID_FROM_REQUEST); - if ( $user_id != USER_ROOT + if ( !$this->Application->permissionCheckingDisabled($user_id) && !$this->Application->isAdmin && !($editing_mode || ($id_from_request ? $this->checkItemStatus($event) : true)) ) { - // non-root user AND on front-end AND (not editing mode || incorrect status) + // Permissions are being checked AND on Front-End AND (not editing mode || incorrect status). $perm_status = false; } } Index: branches/5.2.x/core/kernel/managers/request_manager.php =================================================================== diff -u -N -r16513 -r16561 --- branches/5.2.x/core/kernel/managers/request_manager.php (.../request_manager.php) (revision 16513) +++ branches/5.2.x/core/kernel/managers/request_manager.php (.../request_manager.php) (revision 16561) @@ -1,6 +1,6 @@ Application->recallObject($event->Prefix . '_EventHandler'); - if ( ($this->Application->RecallVar('user_id') == USER_ROOT) || $event_handler->CheckPermission($event) ) { + if ( $this->Application->permissionCheckingDisabled() || $event_handler->CheckPermission($event) ) { $this->Application->HandleEvent($event); $this->Application->notifyEventSubscribers($event); } @@ -481,4 +481,4 @@ $opener_stack->push($template, $params, $index_file); $opener_stack->save(); } -} \ No newline at end of file +}