Copied to clipboard

Flag this post as spam?

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


  • mlu 12 posts 74 karma points
    Jun 05, 2014 @ 10:57
    mlu
    0

    Check IContent access rights for member - performance

    We develop an API for accessing content nodes. One Interface provides an overview over all nodes the member can access. So we check every node, the user has access to.

    My implementation uses this call to check.

    Umbraco.Web.UmbracoHelper.MemberHasAccess(content.Id, content.Path);
    

    The average time to do this check is 0.074738213 sec - After 150 nodes we end up in 11.2 sec

    Is there an faster access-check?

    Best regards.

  • Damiaan 442 posts 1302 karma points MVP 6x c-trib
    Sep 10, 2015 @ 14:05
    Damiaan
    0

    Hi

    How did you solved this issue?

    Kind regards
    Damiaan

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Sep 11, 2015 @ 12:27
    Dennis Aaen
    0

    Hi Damiaan,

    Try to see this documentation https://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/ and search for HasAccess

    Hope this helps,

    /Dennis

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Sep 11, 2015 @ 12:23
    Alex Skrypnyk
    0

    Hi Damiaan and mlu,

    You can try to use IPublishedContent nodes for getting nodeId, it will be faster than IContent.

Please Sign in or register to post replies

Write your reply to:

Draft