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 438 posts 1290 karma points MVP 3x c-trib
    Sep 10, 2015 @ 14:05
    Damiaan
    0

    Hi

    How did you solved this issue?

    Kind regards
    Damiaan

  • Dennis Aaen 4457 posts 17970 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 5908 posts 22603 karma points MVP 4x 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.

  • 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