Skip navigation
Currently Being Moderated

Multiple timeout lengths depending on Authorization

Jun 24, 2012 7:56 AM

I have multiple User Authorization settings (Administrator, Editor, Member, etc.) for my site. I'm not familiar with scope settings or anything like that, so I've used Dreamweaver to set those up. What I'd like to do is set a different timeout setting for Administrators and Editors because when performing site updates and things, I'm often on one page longer than the current setting. Is there a way to set the timeout setting conditionally? Something like this:

 

<cfif Session.MM_UserAuthorization EQ "Administrator" or Session.MM_UserAuthorization EQ "Editor">

  <cflock scope="session" type="readonly" timeout="120" thrownontimeout="no">

<cfelse>

  <cflock scope="session" type="readonly" timeout="30" thrownontimeout="no">

</cfif>

 

Will that work?

 

Jeremy

 
Replies
  • Currently Being Moderated
    Jun 24, 2012 8:17 AM   in reply to jawmusic

    The easiest way to get an answer for this sort of thing is to just try it.  What happens when you try it?

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 3:48 PM   in reply to jawmusic

    If the issue is that administrators stay on pages longer, the applicable variable is application.sessiontimeout and it applies to all users.  You don't want to mess with that.

     

    I had a similar problem once and solved it a different way.  On the page on which the user spent a lot of time, I added an itty bitty iframe.  In that iframe I had a page that simply refreshed itself every 10 minutes.  With a 20 minute timeout, my problem was solved.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 1:07 AM   in reply to jawmusic

    I haven't tried it yet because I didn't want to risk screwing something up and causing a bigger problem that I couldn't fix.

     

    OK, your approach to development / experimentation could stand some revision.  If you're experimenting with new code / concepts, then don't test it within your main codebase (and I sure hope you are not developing straight on your production server???), have a test area where you check things out.  That way your experiments aren't influenced by code that is not relevant to the experiments, and the experiment will not impact anything else.

     

    --

    Adam

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points