New "debug" event permission

1 view
Skip to first unread message

Alexander Obuhovich

May 18, 2010, 8:43:14 AM5/18/10
to In-Portal Development
All events, that are executed based on user form submit are checked against permission, that allows to execute them. Mapping between events and their permissions is defined in "mapPermissions" method of event handler, that holds event implementation.

Recently I came across need to make several events to be allowed for execution not based on user group-based permission, but simply when debug mode is on.

To use it you need to use "debug" keyword in permission mapping instead "add"/"edit" etc. e.g.:

function mapPermissions()

    $permissions = Array (
        'OnMassDelete' => Array ('self' => 'debug'),

    $this->permMapping = array_merge($this->permMapping, $permissions);


Best Regards,
Reply all
Reply to author
0 new messages