Copied to clipboard

Flag this post as spam?

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

  • nickornotto 397 posts 900 karma points
    Mar 20, 2019 @ 23:34

    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 53 posts 147 karma points MVP 2x c-trib
    Mar 21, 2019 @ 17:13
    Nurhak Kaya

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

Please Sign in or register to post replies

Write your reply to: