Index: branches/5.0.x/core/units/admin/admin_events_handler.php =================================================================== diff -u -r12734 -r12877 --- branches/5.0.x/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 12734) +++ branches/5.0.x/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 12877) @@ -1,6 +1,6 @@ Name, $system_events)) { @@ -98,15 +98,6 @@ $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "mod_rw%"'); } - function OnResetCMSMenuCache(&$event) - { - if ($this->Application->GetVar('ajax') == 'yes') { - $event->status = erSTOP; - } - - $this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName IN ("cms_menu", "StructureTree")'); - } - function OnResetSections(&$event) { if ($this->Application->GetVar('ajax') == 'yes') { @@ -460,8 +451,10 @@ } $prefix_elems = split('\.|_', $prefix_special, 2); $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); + if(!$this->Application->CheckPermission($perm_sections['main'].'.view')) { - $this->Application->Redirect('no_permission'); + $event->status = erPERM_FAIL; + return ; } $export_helper->PrefixSpecial = $prefix_special; @@ -485,7 +478,8 @@ $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); if(!$this->Application->CheckPermission($perm_sections['main'].'.view')) { - $this->Application->Redirect('no_permission'); + $event->status = erPERM_FAIL; + return ; } $export_helper->GetCSV(); @@ -503,7 +497,8 @@ $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); if(!$this->Application->CheckPermission($perm_sections['main'].'.add') && !$this->Application->CheckPermission($perm_sections['main'].'.edit')) { - $this->Application->Redirect('no_permission'); + $event->status = erPERM_FAIL; + return ; } $object =& $event->getObject( Array('skip_autoload' => true) ); @@ -547,7 +542,8 @@ $prefix_elems = split('\.|_', $prefix_special, 2); $perm_sections = $this->Application->getUnitOption($prefix_elems[0], 'PermSection'); if(!$this->Application->CheckPermission($perm_sections['main'].'.add') && !$this->Application->CheckPermission($perm_sections['main'].'.edit')) { - $this->Application->Redirect('no_permission'); + $event->status = erPERM_FAIL; + return ; } $import_helper->ImportStep();