In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
241 [In-Portal CMS] Permissions bug report always 2009-08-24 07:28 2010-01-11 22:05
alex  
alex  
critical  
closed 5.0.0  
fixed  
 
none 5.0.2  
0
0000241: Fatal error, when trying to get event section (for permission checking) in SetCustomQuery method
When you try to call given code inside "kDBEventHandler::SetCustomQuery" method, then you get fatal error about unknown prefix.

$perm_section = $event->getSection();
$allowed = $this->Application->CheckPermission($perm_section . '.advanced:permission_name');

-----
There are no places in default installation when such error happens, only in customizations.
This all happens, because "top_prefix" event parameter is not set for item/list build events. In normal cases it is only set for main event (which name is given in user's request).

You always can hardcode section name and not to get it from event, but in case if typing error occurs, then such case will be hard to track, because no visual errors occur.
Issue History
2010-01-11 22:05 Dmitry Note Added: 0001392
2010-01-11 22:05 Dmitry Status resolved => closed
2009-10-03 07:23 administrator Priority normal => critical
2009-10-03 07:23 administrator Type @70@ => bug report
2009-09-29 15:25 alex Patch Status => Not Used
2009-09-29 15:25 alex Fixed in Version => 5.0.2
2009-09-29 15:24 alex Changeset attached 5.0.x r12642
2009-09-29 15:24 alex Note Added: 0000591
2009-09-29 15:24 alex Status active => resolved
2009-09-29 15:24 alex Resolution open => fixed
2009-09-29 15:24 alex Assigned To => alex
2009-09-23 12:21 alex Time Estimate Added 1
2009-09-23 12:21 alex Note Added: 0000515
2009-08-24 15:26 Dmitry Target Version => 5.0.2
2009-08-24 07:28 alex New Issue

Notes
(0000515)
alex   
2009-09-23 12:21   
This already done and tested on other project and awaiting to be commited.
(0000591)
alex   
2009-09-29 15:24   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000241: Fatal error, when trying to get event section (for permission checking) in SetCustomQuery method
(0001392)
Dmitry   
2010-01-11 22:05   
Closing completed tasks.