Copied to clipboard

Flag this post as spam?

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


  • Josefine 30 posts 143 karma points
    Feb 17, 2025 @ 11:29
    Josefine
    0

    SQL query: member groups on protected page

    Help me show the member groups that have access to a protected page:

    SELECT 
        n.id AS NodeId,
        n.text AS NodeName
    FROM 
        dbo.umbracoNode n
    JOIN 
        dbo.umbracoAccess a ON n.id = a.nodeId
    WHERE 
        n.trashed = 0
    ORDER BY 
        n.createDate DESC;
    

    Best regards, Josefine

  • girish 23 posts 116 karma points
    Feb 18, 2025 @ 06:40
    girish
    0

    Nice! It would be even better if you include a.loginGroup AS MemberGroup in the SELECT to show which member groups have access. Just a thought for more clarity!

  • Josefine 30 posts 143 karma points
    Feb 18, 2025 @ 19:48
    Josefine
    1

    Thank you for your reply! :D

    It didn't work with a.loginGroup but you gave me an idea and I found it when I used:

    SELECT ar.ruleValue AS MemberGroup

    LEFT JOIN dbo.umbracoAccessRule ar ON a.id = ar.accessId

    Josefine

  • girish 23 posts 116 karma points
    Feb 19, 2025 @ 05:16
    girish
    0

    I'm sorry, Yes the terms I used weren't right—I just added that suggestion as a thought. Glad you found a solution with ar.ruleValue!

  • 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