Copied to clipboard

Flag this post as spam?

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


  • Tim 174 posts 398 karma points
    Mar 19, 2018 @ 17:01
    Tim
    0

    Check access to page based on node id

    Is there a way of checking if a member has access to a page by node id rather than path?

    We've got a set of node ids that I'd rather validate than converting to IPublishedContent just to get the path for which seems a little inefficient.

    It's basically a replacement to Umbraco.IsProtected(nodeId, path)

    Thanks in advance.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Mar 19, 2018 @ 17:35
    Dennis Aaen
    0

    Hi Tim,

    Can you use the MemberHasAccess method perhaps?

    https://our.umbraco.org/documentation/reference/querying/umbracohelper/#memberhasaccessint-nodeid-string-path

    Hope this helps,

    /Dennis

  • Tim 174 posts 398 karma points
    Mar 19, 2018 @ 17:41
    Tim
    0

    Thanks, sadly that's obsolete though in the latest build :)

  • 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