Brigham Young publicly taught that Black members of the Church could not hold the priesthood. We do not have any record of Brigham Young clearly saying whether this rule came from a revelation from God or from his own understanding. When he spoke about it, he used phrases like “I know” instead of saying, “Thus saith the Lord,” which was language prophets usually used when they were sharing direct revelation.
Mom-level answer
Brigham Young publicly declared that black members of the Church could not have the priesthood because of the curse of Cain (Source). We have no records that Brigham Young ever stated the source of this policy, whether it was based on revelation or not.
However, when Brigham Young made this announcement, he used language saying “I” and not “thus saith the Lord.” Here is a portion of what He said: “I tell you this people that [are] commonly called Negros are [the] children of Cain, I know they are; I know they cannot bear rule in [the] priesthood, [in the] first sense of [the] word” (Source).
However, a 1949 statement from the then-First Presidency indicates that they believed it was based on revelation (Source).