Sahana Stream Security

Security checks on stream functions are performed in the same way as normal module functions. The stream functions and the table permissions should be given in the 'sec_policy.xml' file of the owner module.


The front controller will perform the necessary checks and add stream errors specific to the stream.
Each stream should have a default stream error function in the format

_shn_<stream>_display_errors()

which takes no arguments.

Any action specific error call backs can also be defined. If defined, if one or more errors are added using add_error(), the appropriate call back function will be executed to display the error message in the action specific manner.
The format of the callback function is as follows.

_shn_<stream>_<mod>_<action>__display_errors()


Known Issues

When using XAJAX, the 'exitAllowedOff()' function of the xajax class should be called at the initialization stage or any errors will not be displayed because xajax exists the script execution by default. eg.

	$xajax = new xajax($myurl);

	$xajax->exitAllowedOff(); // important

	$xajax->registerFunction($myfunction);
	$xajax->processRequests();

Navigation
  • Navigate