The precedent for this is the concept of rights under medieval feudalism. Rights are something granted by a "lord" to his vassals and dependents. Be it a king to a duke or a baron to his peasants. No notion of equal rights, of course.
The king rules by divine right, but all other rights are created by Man.
This isn't quite the EU formulation, but you can see how their attitiude has its roots here.
Though we may find the concept of natural rights in human nature or the Bible, as a political force in world politics it started with the American Revolution.