Announcements
I have a requirement to allow access to a web page to Anonymous Users but once any users logged-in then restrict access to that page or logged-in users. I tried with Web Role but it didn't work
Any solutions ?
Thanks
Regards
MO
Hi @MO4
Create a Web Page Access Control Rules and add the Web roles to those rules to hide for Authenticated users but show for Anonymous Users.
Please link and Accept it as a Solution if it helps you.
Thanks,
Amit
I tried the given solution. But its hiding the page from anonymous users also. It don't work.
Thanks for reply. 😉
Hi @MO4 ,
The solution proposed by @Anonymous should work. Another way to achieve this is if you create a web template for your page by yourself in liquid. Then you can easily have a condition like below to show content depending if user is logged in or not.
{% if user %} // CONTENT FOR LOGGED IN USER {% else %} // CONTENT FOR ANON USERS {% endif %}
Hi @OOlashyn thanks for reply
i want to hide button from navbar once any users logged-in the button should disappear
Usually, when you do it vice-verse ie restrict access to a web page by specific role with web page access control rules it will automatically remove the link from the header because of the access permissions. However, with the anonymous user, I would suggest modifying Header web template with liquid to see if a user is logged in and if the page is the one you need to hide and just skip it's rendering.
Web Page Control Access work only for authenticated type Web Roles as far as I know
there are a few options to achieve your need:
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Thanks this worked for my needs
& thanks @OliverRodrigues
</div> <div id="navbar" class="navbar-collapse collapse"> {% if user %} {% assign primary_nav = weblinks["User Weblink Set"] %} {% else %} {% assign primary_nav = weblinks["Guest Weblink Set"] %} {% endif %} {% if primary_nav %} ----------------​
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 58
11manish 49
Haque 28