Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • curtismccaw 29 posts 89 karma points
    Jan 22, 2025 @ 10:36
    curtismccaw
    0

    Is there a way to check if a page is protected (restirct public access)

    Hi,

    We're currently looping through a lot of pages for our custom navigation. We are planing to show locked pages on the navigation, then users must sign into view them.

    Is there a way to check if a page has been restricted from public view? I.e. A user must login to see it?

    We'd like to show an icon on the template if that is the case.

    Any ideas?

    Thanks

  • Sæve 6 posts 80 karma points
    Jan 22, 2025 @ 13:39
    Sæve
    1

    Assuming that your using a supported version of Umbraco, V10 or higher, you can use the MemberManager to help determine this.

    You can inject the manager into your view(s) or helper class and should be able to determine if a page is restricted by using any of these, depending on your needs:

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies