The same people who edit the article can decide who gets credit. When you edit an article you can decide for yourself how much credit you deserve, and if some subsequent editor disagrees, they can change it, or discuss it on the talk page as with the the contents of the articles.
We get enough heated debates about content, can you imagine trying to reach a consensus on whether or not a particular user's work is worth crediting on the page? Pretty much everyone involved in the debate will have a conflict of interest!