custom show_error function
improve acl logic