<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>We have a "maintenance mode" in our app which is kind of similar. We do this before calling the authenticate method, and our entire app is covered by authentication, so it isn't quite the same. But this does the conditional global redirect.&nbsp;</div><div><br></div><div>I guess you could check the action more imaginatively - I do this just to avoid looping/recursion.&nbsp;</div><div><br></div><div>All the best</div><div>Stuart</div><div><br></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #c500f5">sub </span>begin <span style="color: #d12100">: </span>Private <span style="color: #d12100">{</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; <span style="color: #c500f5">my </span>( <span style="color: #000000">$</span><span style="color: #c600f5">self</span>, <span style="color: #000000">$</span><span style="color: #c600f5">c</span><span style="color: #000000"> </span>) = <span style="color: #000000">@</span><span style="color: #c600f5">_</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #d12100; min-height: 15.0px">&nbsp;&nbsp; &nbsp;...</p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; <span style="color: #c500f5">if </span>(<span style="color: #000000">$</span><span style="color: #c600f5">c</span>-&gt;<span style="color: #000000">action</span>()-&gt;<span style="color: #000000">name</span>() ne <span style="color: #3300ff">'maintenance'</span>) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c500f5">my </span><span style="color: #000000">$</span><span style="color: #c600f5">maintenance</span><span style="color: #000000"> </span>= <span style="color: #000000">$</span><span style="color: #c600f5">c</span>-&gt;<span style="color: #000000">config</span>()-&gt;{<span style="color: #000000">maintenance</span>} || <span style="color: #c02000">0</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c500f5">if </span>(<span style="color: #000000">$</span><span style="color: #c600f5">maintenance</span><span style="color: #000000"> </span>== <span style="color: #c02000">1</span>) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000">$</span><span style="color: #c600f5">c</span>-&gt;<span style="color: #000000">go</span>(<span style="color: #3300ff">'maintenance'</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; &nbsp; &nbsp; }</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(209, 33, 0); ">&nbsp; &nbsp; }</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #d12100; min-height: 15.0px">&nbsp;&nbsp; &nbsp;...<br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-style-span" style="color: rgb(209, 33, 0); ">}</span></div><div><font class="Apple-style-span" color="#D12100" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div><br><div><div>On 2010-03-27, at 5:25 AM, Ovid wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>--- On Sat, 27/3/10, Ovid &lt;<a href="mailto:publiustemp-catalyst@yahoo.com">publiustemp-catalyst@yahoo.com</a>&gt; wrote:<br><br><blockquote type="cite">From: Ovid &lt;<a href="mailto:publiustemp-catalyst@yahoo.com">publiustemp-catalyst@yahoo.com</a>&gt;<br></blockquote><br><blockquote type="cite">I'm working on an app where users must authenticate (via<br></blockquote><blockquote type="cite">CatalystX::SimpleLogin and a custom ActionRole).&nbsp; At<br></blockquote><blockquote type="cite">times, users may engage in activity which temporarily makes<br></blockquote><blockquote type="cite">it impossible to take any other action. Hypothetical<br></blockquote><blockquote type="cite">example: users kick off a job which takes 5 minutes to run,<br></blockquote><blockquote type="cite">so we restrict their ability to do *anything* else for that<br></blockquote><blockquote type="cite">5 minutes. Thus, it would be nice if I could globally<br></blockquote><blockquote type="cite">redirect any authenticated user to something like<br></blockquote><blockquote type="cite">/user/waiting/ or something like that.<br></blockquote><br>Er, actually that would be "disallow any actions requiring authentication". Some portions of the (FAQs, for example) don't require authentication. Thus, if "before execute" was the way to go, I'd need to know whether or not the user is taking an action requiring authentication.<br><br>Cheers,<br>Ovid<br>--<br>Buy the book &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="http://www.oreilly.com/catalog/perlhks/">http://www.oreilly.com/catalog/perlhks/</a><br>Tech blog &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="http://blogs.perl.org/users/ovid/">http://blogs.perl.org/users/ovid/</a><br>Twitter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="http://twitter.com/OvidPerl">http://twitter.com/OvidPerl</a><br>Official Perl 6 Wiki - <a href="http://www.perlfoundation.org/perl6">http://www.perlfoundation.org/perl6</a><br></div></blockquote></div><br></body></html>