[pmwiki-users] Author cookies

Pico pmwiki at ben-amotz.com
Sat Aug 12 15:43:23 CDT 2006

Patrick R. Michaud wrote:
> On Sat, Aug 12, 2006 at 03:48:58PM -0400, Pico wrote:
>> Patrick R. Michaud wrote:
>>> ...where do you expect the checkbox to appear?
>> How about always display it on the login screen?
>> I think I must be missing something, because it seems so obvious, so 
>> I'll break down the steps to make the discussion explicit:
>> [...]
> ...but none of the sites I run have a "login screen".
> Authors on the systems I run generally enter their names
> in the edit form.
> But just because there's no login screen doesn't mean that
> authors don't want to sometimes "logout" -- i.e., to remove
> their name from the "Author" field in the edit form.
> (In some of my systems we have on the order of 1,000 authors;
> we don't have "user logins" and we don't want them because maintaining
> hundreds of user accounts and passwords would be a huge pain,
> for almost no additional capability or benefit.)

Ok, now I understand my prior misunderstanding, and I see a light at the 
end of the tunnel.

There are several different situations that should be taken into account.

1. Password protections
a. No password required
b. Password prompt on first edit
c. Name+Password required on first edit (e.g. AuthUser)

2. Save options from edit screen
a. No author name required
b. Author name required

Obviously (in hindsight) the thread was not dealing with the situation 
in 1c until I came along and addressed (only) that situation.  But now I 
think it might be helpful to think about all of the situations and what 
behavior would be expected in each.

When dealing with setups where no login screen is utilized, I agree that 
the logout action should clear the author name cookie.

By contrast, however, I think that in situations where a login screen is 
used, as with AuthUser, I agree with the view that the logout action 
should *not* clear the author cookie.  Instead, I think that in such 
(login) setups, the Login name should be prefilled from the author 
cookie.  If a new user comes along, they can change the name field. 
When the login form is posted, PmWiki checks the name against the cookie 
and if they don't match, it changes the cookie.  (Or forget the test and 
simply change the cookie whenever the login form is posted).

Note neither of these situations really requires a checkbox to indicate 
whether to remember the author because the current author name is always 
remembered until a new author comes along and enters their name and the 
only exception is when the logout action is used in s setup that does 
not use a Login (Name+Password) authorization.

An alternative might be to create a new ?action=clearcookies that clears 
any and all PmWiki cookies.  (Is the skin cookie reset when the author 
is cleared on a logout on a non-login system?  If not, shouldn't it be? 
  Otherwise the site could have a different skin everytime I use it, 
based on who used it before me).


More information about the pmwiki-users mailing list