Eliminate access to specific user based on url, uid and role I'm using D8 and I have a panel page which has as parameter in the URL the uid (mysite/uid). In this page, are loaded different nodes and forms. What I want to do is to eliminate the access only to this user and the admin. It is not a node of a content type so as I can use the existing permissions (edit your own page). 

Any idea how to implement this?

I was thinking to use something, maybe hook(?), triggered every time the user tries to access that page and doing some checks like the url and the uid and if the user is not admin or doesn't have the correct uid, throw an AccessDeniedHttpException();
I don't understand what you want to do specific to the panels page. In general you are looking for some kind of hook triggered every time a user visits a page. In D8 every page is connected to a route. You have to implement an access check on this route, see the documentation Access checking on routes. You can define the access check when you create a route or if you have an existing route from another module you can alter the route definition, see for this the next chapter in the documentation Altering existing routes