It's going to be very difficult to teach a dog that barking/growling is permissible in certain situations, but not permissible in others. Good luck though