Copied to clipboard

Flag this post as spam?

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


  • Scott 69 posts 146 karma points
    Mar 09, 2012 @ 17:12
    Scott
    0

    4.7.1 Preview Mode and Authenticated website

    Our umbraco website is a customer website and requires the customer to authenticate before coming in. Because I dont want my developers and content updaters to have to login, I put code in my templates to check for preview mode, and if in preview, go ahead and show the page unauthenticated. But I'm detecting based on the UMB_PREVIEW cookie. That's so easy to stuff into the browser. Is there a better way? I'm actually detecting in two different places, one inside some asp.net and one from with an XSLT page using these two methods:

    From asp.net:if (umbraco.presentation.UmbracoContext.Current.InPreviewMode)

    From xslt: <xsl:variable name="InPreviewMode" select="umbraco.library:RequestCookies('UMB_PREVIEW')"/> 

     I dont know if the first method is checking a cookie too or not, but cookie checking wont cut it for me. Is there another/better way?

     

     

     

     

     

  • 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