The grammaticality of your sentence is a good example of the mess people get into when they starting thinking about grammatical case in English, and why "whom" gives so much trouble.
There is such a rule, but it is not about whether the relative pronoun would be "who" or "whom": it is about whether or not the NP (noun phrase) which is the antecedent of the relative clause is the subject of that clause.
In
The man who came yesterday was French
you cannot omit "who", because "the man" is the subject of the relative clause.
In
The man (who(m)) I saw yesterday was French
you can, because "the man is the object of "I saw".
In simple cases there is only one clause introduced by the relative, so if the antecedent is not the subject of it, it will be in the objective case, and "whom" is appropriate, if we use it at all.
The man (whom) I saw yesterday was French
But the given example is complex, with an embedded clause [I hope [(that) he will come], so the antecedent "the man" is actually the subject of the (inner) embedded clause. Thus the structure is
I have (a friend (who I hope (he will come)))
where the 'he' is replaced by the 'who' (not 'whom') in the clause above, and then optionally omitted because neither it nor its containing clause is the subject of the relative clause.
It's worth noting that this is a case where people who do want to use "whom" sometimes get confused, and use "whom" 'incorrectly'.
With a compound subject, the general rule is: If it uses "and", then clearly it's plural, so you should use a plural verb. If it uses "or", then the number of the verb should match the number of the LAST item in the list.
For example:
Either Bob or Fred has the answer.
Either Bob or the Thompson twins have the answer.
Either the Thompson twins or Bob has the answer.
(I haven't looked up a citation for this, but that's the rule I was taught in elementary school.)
Edit:
I see there is some disagreement, so I just did a quick search. Here's a link to a college grammar site: http://leo.stcloudstate.edu/grammar/subverag.html. They say:
If subjects are joined by or or nor, the verb should agree with the closer subject.
Either the actors or the director is at fault.
Subjects: actors, director; Verb: is
Either the director or the actors are at fault.
Subjects: director, actors; Verb: are
Best Answer
Issues involving personal pronouns that are the antecedent for a relative clause, such as in an it-cleft, are sometimes not so simple--that is, they can sometimes be notoriously unclear. There are well-known types of examples where such difficulties show up, such as: I saw he/him who would soon wear the crown.
The OP's question is about an it-cleft. And so, this post will address that.
It seems to me that reasonable grammatical rationales could probably be made for both versions.
Here are some somewhat related examples that are considered to be grammatical in today's standard English. In CGEL on page 459:
And in CGEL on page 507:
So, some people can use the rationale involving "the general rules for relative clauses" to support the acceptability of:
While some people can use the rationale that the "you" in the main clause ("It is you") is in accusative case, and so the cleft's relative clause can take the "default 3rd person feature" (whether singular or plural, er, that could be subject to discussion too), and so:
I suspect that context could have a strong influence on the choice: A plural "you" could prefer the plural "have", and a singular "you" could prefer a singular "has". The style and register could also affect the choice.
I think people could make stronger (or weaker) grammatical arguments and rationales to support one position or the other. And perhaps they could provide the corresponding contexts to support those positions, and perhaps also provide some vetted grammatical sources--which would also be nice.
(Aside: Questions like this one, which are asked by brand-new members, tend to raise some suspicion: Is this an interesting question that is innocently asked? or, Is the asker a linguistics student trying to pull on a tail or two? Yea, I be paranoid, as I be stuck on this tree of woe.)
Note that CGEL is the 2002 reference grammar by Huddleston and Pullum et al., The Cambridge Grammar of the English Language (CGEL).