Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/db/cat_event_handler.php
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | |||||
$perm_value = true; | $perm_value = true; | ||||
$event->setEventParam('ids', $ids); // will be used later by "kDBEventHandler::StoreSelectedIDs" method | $event->setEventParam('ids', $ids); // will be used later by "kDBEventHandler::StoreSelectedIDs" method | ||||
} | } | ||||
return $perm_helper->finalizePermissionCheck($event, $perm_value); | return $perm_helper->finalizePermissionCheck($event, $perm_value); | ||||
} | } | ||||
$export_events = Array ('OnSaveSettings', 'OnResetSettings', 'OnExportBegin'); | $export_events = array('OnSaveSettings', 'OnResetSettings', 'OnExportBegin'); | ||||
if ( in_array($event->Name, $export_events) ) { | |||||
// when import settings before selecting target import category | if ( in_array($event->Name, $export_events) || ($event->Special == 'export' && $event->Name == 'OnNew') ) { | ||||
return $this->Application->CheckPermission('in-portal:main_import.view'); | /** @var kPermissionsHelper $perm_helper */ | ||||
$perm_helper = $this->Application->recallObject('PermissionsHelper'); | |||||
$perm_value = $this->Application->CheckPermission('in-portal:main_import.view'); | |||||
return $perm_helper->finalizePermissionCheck($event, $perm_value); | |||||
} | } | ||||
if ( $event->Name == 'OnProcessSelected' ) { | if ( $event->Name == 'OnProcessSelected' ) { | ||||
if ( $this->Application->RecallVar('dst_field') == 'ImportCategory' ) { | if ( $this->Application->RecallVar('dst_field') == 'ImportCategory' ) { | ||||
// when selecting target import category | // when selecting target import category | ||||
return $this->Application->CheckPermission('in-portal:main_import.view'); | return $this->Application->CheckPermission('in-portal:main_import.view'); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2941 Lines • Show Last 20 Lines |