Viewing Issue Simple Details |
ID |
Category |
Type |
Reproducibility |
Date Submitted |
Last Update |
0000241 |
[In-Portal CMS] Permissions |
bug report |
always |
2009-08-24 07:28 |
2010-01-11 22:05 |
|
Reporter |
alex |
View Status |
public |
|
Assigned To |
alex |
Priority |
critical |
Resolution |
fixed |
|
Status |
closed |
|
|
|
|
Summary |
0000241: Fatal error, when trying to get event section (for permission checking) in SetCustomQuery method |
Description |
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. |
Additional Information |
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. |