add hook func which called when permission check failed.