<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Patrick,<br>
<br>
I have the sequencing figured out.<br>
<br>
Here's my code in farmconfig:<br>
<br>
include_once('local/config.php');<br>
$pagename = ResolvePageName($pagename);<br>
$isEditAuthorized = (boolean)RetrieveAuthPage($pagename, 'edit', false,
READPAGE_CURRENT);<br>
echo ' value='.$isEditAuthorized;<br>
<br>
I think there may be two problems. <br>
<br>
1. I'm not using (and don't want to use) authuser.php. My author group
is quite content with the simple base password protection.<br>
<br>
2. $isEditAuthorized still returns true *after* logout
(&action=logout) per the above echo statement. I want to detect
that edit is no longer authorized after logout so that I can alter page
layout (suppress "custodian" ie. author menus). I'm just finding that
clearing the browser's cache fixes that, but I don't understand why,
and I can't ask my users to clear their browser cache whenever they
logout. Is the echo of $isEditAuthorized returning true because the
echo is part of a cache, when in fact $isEditAuthorized is false on the
server?<br>
<br>
If the &action=logout action doesn't in fact cause the page to be
refreshed from the source, how do I make it do that? (The page would
have to be refreshed to change the layout).<br>
<br>
if ($action='logout') {<br>
#cause page refresh???<br>
}<br>
<br>
I have $EnableIMSCaching=1; in my farmconfig.php so that page location
is preserved when the user returns to a page.<br>
<br>
Sorry about my stridency earlier. Frustration boileth over sometimes.
Hot and muggy in Toronto<grin>.<br>
<br>
Best,<br>
<br>
- Henrik<br>
<br>
<br>
<pre class="moz-signature" cols="72">Henrik Bechmann
<a class="moz-txt-link-abbreviated" href="http://www.osscommons.ca">www.osscommons.ca</a>
<a class="moz-txt-link-abbreviated" href="http://www.bechmannsoftware.com">www.bechmannsoftware.com</a>
Webmaster, <a class="moz-txt-link-abbreviated" href="http://www.dufferinpark.ca">www.dufferinpark.ca</a></pre>
<br>
<br>
Patrick R. Michaud wrote:
<blockquote cite="mid20060803152530.GM9604@host.pmichaud.com"
type="cite">
<pre wrap="">On Tue, Aug 01, 2006 at 05:48:00PM -0400, Henrik Bechmann wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'd really appreciate an answer to this. I'm looking at days of effort
ahead to answer a question that it seems to me should be pretty
straightforward.
</pre>
</blockquote>
<pre wrap=""><!---->
Can we restart this question from the beginning? As you say,
it seems to me that this should be pretty straightforward, but
the answers in the thread seem to be out of proportion to the
problem being solved.
So, can we go back to the original? I think that one ought to be
able to determine edit authorization by doing:
$pagename = ResolvePageName($pagename);
$isEditAuthorized =
(boolean)RetrieveAuthPage($pagename, 'edit', false, READPAGE_CURRENT);
Of course, this code has to go *after* any authorization settings;
i.e., after including authuser.php, setting $DefaultPasswords, etc.
If you're wanting to do this from a farmconfig, it's very important
to get the sequencing correct (but it can be done from within the
include files).
The above should work even with ?action=logout, as ?action=logout
already performs its own redirect after clearing the session variables.
Pm
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">On 7/27/06, Henrik Bechmann <a class="moz-txt-link-rfc2396E" href="mailto:henrik@bechmannsoftware.com"><henrik@bechmannsoftware.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hagan,
</pre>
</blockquote>
<pre wrap="">[...]
</pre>
<blockquote type="cite">
<pre wrap="">So it looks like I'll be able to call this function from within my PHP
code to decide on layout, BUT...
...there is one more problem.
I want isEditAuthorized to return false after action=logout on the page,
so that the author can revert to the user page layout (no author menus,
etc). But action=logout apparently does not clear the [=auth][edit]
value until the next attempt to login (caching?).
Is there some way to detect that a logout has taken place?
</pre>
</blockquote>
<pre wrap="">Try
if ($action == 'logout') {
## A logout has taken place.
}
Maybe this would cause the page to reload?:
if ($action == 'logout') {
header("Location: $ScriptUrl");
}
Hagan
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>