Thanks. I probably should have mentioned that I'm using Spectra 1.5.1 Some
of your code looks like it might be for a previous version. Where is
cookie.cfa_authGroups coming from? I don't think this is a cookie that is
set in 1.5.1 The only cookie that I see now is cookie.cfauth and it
consists of an encrypted string that contains concatenated user, password,
and session key information - no Group info.
Anyway this gives me a few more ideas.
Thanks again,
don
-----Original Message-----
From: Ted Nevels [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 05, 2001 8:49 PM
To: Spectra-Talk
Subject: Re: Spectra-Talk-list V1 #38
Hi Don,
Here is what we do:
At the beginning of the Application.cfm on the root of the site, place the
following code (this code assumes the security group that is authorized for
Design Mode is CONTENT EDITORS):
<!--- setup for designmode --->
<cfparam name="mode" default="Browse">
<cfif ISDefined("URL.designMode") AND ISDefined("cookie.cfa_authGroups") AND
ListContainsNoCase(cookie.cfa_authGroups,"CONTENT EDITORS")>
<cfif URL.designMode>
<cfset mode="design">
<cfset designmode = "true">
<cfcookie name="designmode" value="true">
<cfelse>
<cfset mode="browse">
<cfset designmode = "false">
<cfcookie name="designmode" value="false">
</cfif>
<cfelseif ISDefined("cookie.designMode")>
<cfset designMode = "#cookie.designMode#">
<cfif designMode><cfset mode="design"></cfif>
</cfif>
Immediately follow this code with the application initialization code:
<cfset local.userDirectory="userDirectory">
<cfset local.securityContext="sc1">
<cfa_applicationInitialize
name="#local.appName#"
mode="#mode#"
userDirectory = "#local.userDirectory#"
securityContext = "#local.securityContext#"
clientmanagement="TRUE"
CLIENTSTORAGE="COOKIE"
sessionmanagement="TRUE"
setclientcookies="TRUE"
sessiontimeout="20">
<cfset request.cfa.activeMode = "#mode#">
<!--- Setting security on when in design mode only --->
<cfif request.cfa.activeMode IS "design">
<cfset request.cfa.security.bIsSecure = "TRUE">
</cfif>
With this code in place, you simply add "designmode=true" or
"designmode=false" to any URL to toggle back and forth. If you are going
into designmode, the cfa_applicationInitialize will invoke the login for
you.
Works for us!
Ted Nevels
----- Original Message -----
From: "Spectra-Talk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 05, 2001 6:36 PM
Subject: Spectra-Talk-list V1 #38
> Spectra-Talk-list Sun, 5 Aug 2001 Volume 1 :
Number 38
>
> In this issue:
>
> Loggin In - Display & Design Mode
>
>
> ----------------------------------------------------------------------
>
> Date: Sun, 05 Aug 2001 20:07:38 -0400
> From: "don braithwaite" <[EMAIL PROTECTED]>
> Subject: Loggin In - Display & Design Mode
> Message-ID: <[EMAIL PROTECTED]>
>
> I'm going insane with variations on loggin in - is it really this
> complicated or is it just me? Sorry this is a long one.
>
> Here's the situation. It shouldn't be this complicated, but it's becoming
a
> nightmare.
>
> Normally public users just browse the site. There is no need for them to
> log into anything.
>
> Normally content Authors and Reviewers use the WebTop to enter and edit
> content mostly through Workflow Templates/PLPs. One step of the PLP is a
> preview page which shows them exactly what the page will look like when
it's
> live. Every step of the PLP shows their userID. There are also some
pages
> that use containers that an Admin person would have to edit through Design
> Mode, either through the WebTop or just by using DesignMode=1.
>
> The files that the public are browsing are in the top level directory.
The
> start up files for the PLPs are in an Admin subdirectory one level down.
> Both top-level and Admin each have an Application.cfm
>
> Normally the top-level Application.cfm would really have no need for any
> type of security except when the admin person is going into DesignMode.
>
> I've tried every variation of security tag available to get things to work
> the way I need it to. I really don't understand what they all do even
after
> reading every scap of info I could get my hands on. I've tried every
> combination of using the example Apps.
>
> Every now and then I can get everything working close to the way it should
> be and then I close and open my browser and all of a sudden my homepage
will
> display the login page. Or I get rid of that and when I enter DesignMode
I
> either get no page controls or when I enter DesignMode and then click on a
> link I'm thrown out of Design Mode. And then in the Webtop if I select
> Display Mode the new window opens and kills the CFAuth cookie so I get
> logged out on my next WebTop selection. Or I select DesignMode from the
> WebTop and again get no page controls, or again can't stay in DesignMode
> when I click a link on the opened page.
>
> I know this sounds convoluted, but it really shouldn't be this hard. As
it
> stands right now I've had to basically get rid of all my security just so
> people can surf the site, and the Admin person can go into DesignMode one
> page at a time. This is no good.
>
> Does anyone have any suggestions, ideas, examples - anything to point me
in
> the right directions. Help!
>
> ===
> don braithwaite
> [EMAIL PROTECTED]
> http://www3.sympatico.ca/d.braithwaite
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.