Copied to clipboard

Flag this post as spam?

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


  • manila 235 posts 517 karma points
    Mar 20, 2019 @ 23:34
    manila
    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 30 posts 122 karma points
    Mar 21, 2019 @ 17:13
    Nurhak Kaya
    100

    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:

Draft