Depending on the UI. If you only want to block part of the UI, then conditionally load it. If you want to disable access to the page, then block it with middleware. You (and a bunch of others on this forum) need to explain better what you want to achieve.
So many edge cases you haven't explained. Note that the answer can only be good as the question. All other scenarios would be just guessing things from the side of the person who is answering.