Copied to clipboard

Flag this post as spam?

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


  • nickornotto 403 posts 907 karma points
    Mar 20, 2019 @ 23:34
    nickornotto
    0

    Get roles of page with role based protection

    What's the current alternative to umbraco.cms.businesslogic.web.Access.GetAccessingMembershipRoles? Because umbraco 7.6 highlights it as obsolete and tells to use IPublicAccessService

    I was unable to find out how to use it though, all I got to was

    IContent content = GetById(id);
    Attempt<PublicAccessEntry> access = _publicAccessService.IsProtected(content);
    

    which doesn't have any information about the current page roles.

  • Nurhak Kaya 56 posts 150 karma points MVP 3x c-trib
    Mar 21, 2019 @ 17:13
    Nurhak Kaya
    100

    Please see my stackoverflow answer here to see how you can do it.

  • 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