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();