Is my dog trying to protect me?

So we have people over to work on our drywall. My dog is usually social, but she really doesn’t like these people for whatever reason. She wasn’t being aggressive but she was barking so i took her to a room pretty far from the place that’s being worked on. She’s barking really low and growling and her tail is straight up, as is the tuft of fur on her back (she’s a ridgeback mix) but she’s leaning against me and letting me pet her, even licking my hand. I don’t know if she’s trying to protect me or if she’s scared and wants me to protect her, or if she’s trying to warn me that something’s going on.