Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
The easiest way to get an answer for this sort of thing is to just try it. What happens when you try it?
--
Adam
Copy link to clipboard
Copied
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. As I said, I'm not very familiar at all with scope settings, so I wanted to make sure I wasn't going to do something I wouldn't be able to figure out how to fix if there was no chance it would work. I'll give it a try though.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
No, I'm not doing anything right on the server...developing and testing on my machine. I figured out what I need to do though. That scope is set at the top of each restricted page, so I can just change it on those pages that tend to take longer to update. Thanks!
Connected by DROID on Verizon Wireless
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks, Dan.
Actually, what I figured out is, the pages that I’m worried about this timeout issue happening are pages that are only accessible to Administrators, so I can just change the timeout those pages. Basically, it’s pages that create news entries in the database. Because the text of the news article can take time to compose, especially if you have to edit html while you’re doing it, the 20-minute timeout clock isn’t always long enough, so I kept having to submit it and then open it up again in the editor to continue where I left off. By changing the timeout on those pages, it gives me plenty of time to do what I need to do, and won’t affect the timeout for other visitors, as they won’t be able to access these pages without Administrator privileges.
Just took a little thought on my part, that’s all. Thanks for the help, gentlemen!
JAW