Copied to clipboard

Flag this post as spam?

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


  • Corné Hoskam 81 posts 588 karma points MVP 3x c-trib
    Feb 14, 2022 @ 11:48
    Corné Hoskam
    1

    Getting the 'Restrict Public Access' settings

    Hi Umbracian!

    For a custom Headless Umbraco 9 solution we're looking at utilizing the Restrict Public Access feature to have a custom role-based permission system on which nodes you can access from an API endpoint.

    For this, we were wondering if it is possible to programmatically get the configuration/restrictions on a specific Content Node, as configured in the 'Restrict Public Access' section of Umbraco? I couldn't find anything specific for this on the Docs myself!

    Restrict Public Access

    Thanks!

    Kind regards,

    Corné Hoskam

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 14, 2022 @ 11:59
    Matt Brailsford
    103

    Would that be the IPublicAccessService?

    PublicAccessEntry entry = _publicAccessService.GetEntryForContent(content);
    

    Matt

  • Corné Hoskam 81 posts 588 karma points MVP 3x c-trib
    Feb 14, 2022 @ 12:05
    Corné Hoskam
    1

    Hi Matt,

    That appears to be the service that I was looking for! Much appreciated!

    Kind regards,

    Corné Hoskam

  • 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