Now, on reading Caliban's post, I've changed my mind: this is a lovely way to adjudicate it. Consider the spell's aesthetic. The priest is saying, "Tremble before my god, all who oppose me!" (or, "Feel my god's happy fuzzies, all who assist me!") It's a mind-affecting spell.
If you oppose the priest, no matter how secretively you do so, YOU know you oppose the priest, and you'll tremble. Similarly, if you're on the priest's side, YOU'LL know that, and you'll feel all fuzzy inside.
Having the magic actually affect everyone (but only have a noticeable effect on those who consider themselves allies/enemies) is both logical and elegant, inasmuch as it removes the failsafe-detection trick.
I'd even go so far as to allow a character with Use Magic Device to make a roll -- DC 30, maybe? -- to fake being an ally for the spell's purpose. But that gets wayyy houseruly.
Thanks, Caliban!
Daniel