Better way to validate user than redirect?

Hey, on my site there are some “membership only” pages. Unfortunately do to the requirements of these pages, not all members can access them. Therefore I can’t just use a “members only” page.

Instead, I’ve created a collection that matches users up with their permissions. I have this up and running. Currently, I have it set to redirect anybody from a page if they don’t have permissions. However, I wonder if there are better ways to do this.

For one, you can briefly see the page before you’re redirected even if you don’t have access. This won’t work as some pages will have sensitive issues. Also, I’m not sure, but I suspect it’s possible to stop a redirect, which completely defeats the purpose of members only pages. Thoughts?

By the way, I think I used the wrong word. I’ve already validated, I’m talking about how to kick users off a page/not allow them to view it. Preferably as secure of a way as possible.

Any thoughts on this?

Hi!

If I got your intentions right, reading about Routers should help you achieve your goal.

Doron. :slight_smile:

Hey, started reading up on this. Do you know of any tutorials for validating specifically? The routers pages all seem to have examples on dynamic pages, but not really on authenticating users. I’m sure it’ll be similar to how I redirect, but a tutorial would be awesome.