Index: branches/5.1.x/core/kernel/application.php =================================================================== diff -u -N -r13905 -r13987 --- branches/5.1.x/core/kernel/application.php (.../application.php) (revision 13905) +++ branches/5.1.x/core/kernel/application.php (.../application.php) (revision 13987) @@ -1,6 +1,6 @@ recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ - if ($perm_helper->CheckUserPermission($user, 'CATEGORY.MODIFY', 0, $this->ModuleInfo['Core']['RootCat'])) { + if ($perm_helper->CheckUserPermission($user, 'CATEGORY.MODIFY', 0, $this->getBaseCategory())) { // user can edit cms blocks $editing_mode = $this->GetVar('editing_mode'); define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_BROWSE); @@ -3232,4 +3232,18 @@ return false; } + /** + * Base category of all categories + * Usually replaced category, with ID = 0 in category-related operations. + * + * @return int + */ + function getBaseCategory() + { + // same, what $this->findModule('Name', 'Core', 'RootCat') does + // don't cache while IS_INSTALL, because of kInstallToolkit::createModuleCategory and upgrade + + return $this->ModuleInfo['Core']['RootCat']; + } + } \ No newline at end of file