'before' is deprecated, use 'onBeforeAction'