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 80 posts 587 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 4124 posts 22220 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 80 posts 587 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

Please Sign in or register to post replies

Write your reply to:

Draft