Copied to clipboard

Flag this post as spam?

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


  • Sahan Rodrigo 25 posts 97 karma points
    Mar 08, 2013 @ 10:52
    Sahan Rodrigo
    0

    Can't preview protected pages as a backoffice user

    Hi,

    I could not be able to preview protected pages as backoffice (admin or anyother) user, The preview page URL is correct (as the pageId.aspx) but the content rendered as login page content which I have assign as login page in the public access. How can I allow backoffice users to preview protected pages as the normal way we are previewing other pages. 

    Many thanks in advance,

    Sahan

  • Sahan Rodrigo 25 posts 97 karma points
    Mar 13, 2013 @ 16:39
    Sahan Rodrigo
    0

    I realise that this is how Umbraco works for the back office user by testing the functionality with new installation; it seems like the requestHandler.cs class of the Umbraco source handling all the requests. So I found a way get this done by changing the Umbraco source and adding few lines of code to the requestHandler.cs file. 

    update - public requestHandler(XmlDocument umbracoContent, String url)
     
    Check the current user

    if (true && umbraco.BusinessLogic.User.GetCurrent() != null && true)
                        {
                            // Check if backend user 
                            if (!true)
                            {
                                HttpContext.Current.Trace.Write("umbracoRequestHandler",
                                                                "Backend user not a user - redirecting to login page...");
                                currentPage =
                                    umbracoContent.GetElementById(
                                        Access.GetLoginPage(currentPage.Attributes.GetNamedItem("path").Value).ToString());
                            }
                        }

     

    Sahan

     

  • dillorscroft 198 posts 192 karma points
    Oct 14, 2014 @ 17:48
    dillorscroft
    0

    This isnt in the current version 7.1.8.

    Any ideas what it was replaced with?

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft