Il y a avait is totally incorrect. Maybe you meant il y avait eu ?
Il y a eu is passé composé so yes, it's past and over. However, if you say il y a eu une nouvelle loi (there has been a new law), the law may be still in application at the time you speak (still relevant to the present), but the event have a new law, meaning the new law is published, is actually over. So passé composé is right, and it is used to express the passed instant, the event of the law starting to exist.
Il y avait eu is passé antérieur, so it would be used only if you speak of an event that happened before something else also passed : "Il y avait eu une nouvelle loi mais je ne le savais pas" (There had been a new law but I didn't know that).
"Il y avait" is imparfait and is used to express something that lasted in the past, not an event. Il y avait une loi means the law was in application, but without saying anything about since when. The law could still be in application (il y avait déjà une loi ...) or being over (il y avait une loi, supprimée depuis), the important is that we talk about something who lasted in time.