User specific page access (solved)

I would like to make certain pages restricted to one or more logged in users. What is the simplest way to do this?

Hi @roddi,

Check this out. I think it might help.

Requiring login? (SOLVED)

Thanks @ryanck ,

Need it to be specific to only one (or a specific list) of users rather than anyone who is logged on. Here is what I came up with:

All content is in a container (group A) that is not visible on page load.

When page is loaded and when current user’s email is not specific@user.com go to page index

When page is loaded and when current user’s email is specific@user.com show group A

Can do for one user or a list of users. It’s a bit manual but works.

Thoughts?

5 Likes

That’s how I would do it too.

If the list of users who should have access to a page is quite long or if you need to limit or grant access to several pages, I would add one or more boolean (yes/no) fields to the user database and use that to control access (if current user’s administration field is yes, then show the visible element / if no, navigate to index page).

I’m curious if anyone has other thoughts on this.

5 Likes

Nice. I also added the following to the page HTML header to keep the page out of SERPS.

Another option:
When Page is loaded and (Current User isn’t logged in or CurrentUser’s belongsToGroup1 is “no”): Go to page index
When User is logged out: Go to page index

2 Likes