Optimize permission check for CTAjaxHandler