This is correct and is known as standing.
Standing refers to one's ability to be a part of a lawsuit. In essence, you cannot file lawsuits on matters that don't affect you.
9.5m questions
12.2m answers