Copied to clipboard

Flag this post as spam?

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


  • Connie DeCinko 931 posts 1160 karma points
    Jul 18, 2012 @ 19:09
    Connie DeCinko
    0

    Filter XML Cache by logged in user

    I'm working on a modified version of the pages due for review package. Right now I have it able to show me all pages ready for review in the entire site. My next goal is to filter that list so content editors only see the pages they have rights to edit.

    Where can I get that from? How can I filter the XML to only show these pages?

     

  • Nathan Woulfe 447 posts 1664 karma points MVP 5x hq c-trib
    Jul 19, 2012 @ 06:35
    Nathan Woulfe
    0

    Hi Connie

    I've been working on something similar, code below might be useful to you. Essentially you're looking for the permissions the current user has for each page where the review date has lapsed:

    var currentUser = umbraco.BusinessLogic.User.GetCurrent();
    foreach (var page in pagesForReview) {
    if (currentUser.GetPermissions(page.Fields["path"]).Contains("A")) {
    /// do something - probably provide a link to the node
            }
    }

    I'm using Examine to grab all the nodes where the review date is less than 14 days away, then handling different instances appropriately. 

    Hope that helps.

    Nathan 

Please Sign in or register to post replies

Write your reply to:

Draft