Copied to clipboard

Flag this post as spam?

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


  • manila 204 posts 466 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 26 posts 117 karma points
    29 days ago
    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