Easiest way to make a page visible to one user (ADMIN)

hi guys,

What’s the easiest way to hide a page from the public and make it accessible when i m logged in only?

1 Like

Set up a page workflow that redirects users if they are not logged in. This is the most common way to secure pages.

You’ll a workflow on page load, if current is not logged in, take user to a different or login page

1 Like

Yes exactly. Redirect users who are not authenticated to the login page and you have solved the problem..

If you want to make a page that only system administrators have access to, you need to create a field in the database indicating whether it is an admin or a field that says what type the user is. After that on the desired page group everything into a group and in the group put a visibility condition, where only visible if the user is adm (this prevents the user who reaches the page from seeing the content) and also put a conditional on the ‘page is load’ in case an unauthorized user enters to be redirected to a desired page, I also recommend putting an alert for the user to understand this.

If you are just logged in or not, use the ‘user is logged out’ action and add the rederection, it will be enough

If you actually want to secure the page, you need to the do the following:

  1. Add a database field to the user indicating they are an admin
  2. Add an “On Page load” workflow to the page with the condition as “Current user’s Admin is no” (replace with your admin check), → go to page 404 (or auth, or index, or whatever you want). IMPORTANT: The on page load flow should have ONLY server-side checks (no checking page states, for example), and should only include a go to page workflow. This will make sure that the condition is checked BEFORE the page is loaded, and return a 302 redirect. Otherwise, a tech-savvy user can bypass this.
  3. For extra security, add a similar condition (when current user’s admin is yes) to each action on the page
1 Like

I hope to be proven wrong, but in my experience #2 will NOT be performed server side as written.

Any condition beyond “Current User is Logged In” is performed client side, and the manual’s info seems to bear this out.

I found this useful for testing.

https://www.redirect-checker.org/index.php

It did work. Is what you’re saying related to SEO issues?