Securing Page Access for Admins in Bubble

Hello Bubble community,

I’m facing a challenge while implementing a seemingly simple feature that works on other pages. As an admin, I want to restrict access to a specific page so that only admin or super admin users can view it. However, despite trying three different approaches (as shown in the screenshots below), I’m encountering problems. Each method redirects me to the index page, even though I’m logged in as an admin. Is there something I’m missing?

Here are the methods I’ve tried, each using conditionals:

  1. Page is loaded
  2. Do when condition is true
  3. User is logged in

Despite these workflows, I am being redirected even though I am an admin user. I’d appreciate any insight or alternative approaches to achieve secure page access without compromising performance.

Thanks for your help!

Note that I tested each workflow separately. They all appear in each of my screenshots because I readded them specifically for this Bubble post.

I applied the same workflow for me & it works well. Are values “admin”,“super_admin” just text or coming from an option set?

@rakshitkumar90 they’re coming from an option set. :blush:

I’ve managed to resolve this issue. The solution was simpler than I initially thought. Instead of using an “or” conditional, the correct approach was to use an “and” conditional. This allowed me to accurately check if the “Current user’s role is not admin AND Current user’s role is not super_admin” as depicted in the screenshot. I’m marking this post as solved and hope this insight will be helpful for others facing a similar challenge.