Feature Proposal: Deprecate the initUserHandler plugin interface

Motivation

The preferred way to initialise users is by means of UserMapping/LoginManagers. Using a plugin handler for this is a deprecated concept.

This handler ties plugin initialisation to the user management code. The plugin code would be cleaner if this link were not there.

Description and Documentation

Examples

Impact

%WHATDOESITAFFECT%
edit
I am told this plugin could be changed to use a different handler.
edit
I am told this plugin could be changed to use a different handler.
edit

It is not clear if this plugin actually works.

The plugin topic says "23 Dec 2008: V1.0-4 Ported to Foswiki by Kenneth Lavrsen. Checked in untested as I do not have X509 environment. Feedback wanted

edit

Implementation

-- Contributors: MichaelTempest - 18 Aug 2009

Discussion

it was me who said HomePagePlugin could use a different handler; looking again (as a result of the WIKIHOMEURL investigation) I'm not so sure it could. SvenDowideit needs to give a reading on this (he wrote the plugin).

LoginNameAliasesPlugin does a bunch of scary stuff in the initUserHandler. Reading the code, I'm left with the feeling that a custom user mapping would be the right way to do what it is trying to deliver.

-- CrawfordCurrie - 19 Aug 2009

yes, I think you're right, i think I tried the other handlers when writing HomePagePlugin, but nothing else was called early enough in the startup to allow me to change the BASEWEB&BASETOPIC, and yet late enough to know who logged in. I was thinking that I could re do it using a LoginManager - but as deprecation will mean I have time, am not stressed about it yet smile

LoginNameAliasesPlugin is much much easier - I was originally intending to write a simple custom LoginManager, but thought I'd port the existing Plugin first - to see what someone else thought was useful.

my opinion is still to deprecate it, its a horrible, nasty to support legacy of 3 or 4 generations of user code ago, which has caused me very few happy moments.

(especially as 2 out of 3 uses of it are under my care, and the third should also be written as a LoginManager)

-- SvenDowideit - 19 Aug 2009

I ported the Extensions-X509UserPlugin. But I would not know how to change it to a login manager. I have every good reason to think the plugin works.

It is common that deprecating handlers means fixing all known plugins.

So please do not just discard this one. If you deprecate you need to DOCUMENT how a plugin author should change existing plugins. There will be many unpublished plugins that you break. Deprecating API is like breaking a contract and must be taken serious.

-- KennethLavrsen - 04 Sep 2009

As far as I seee the X509UserPlugin does implement a propert LoginManager and UserMapping:

X509UserPlugin.png

Its initializeUserHandler() impl seems to be some sanity checking that could easily go into the LoginManager, afaics.

-- MichaelDaum - 04 Sep 2009

I am not at all familiar with the UserMapping/LoginManagers side of Foswiki, so I am not in a position to advise plugin developers what they should do instead. Therefore, I am removing my name from "committed developer" and parking this proposal. I still think this proposal could be taken to completion, but I am not the one to do it.

-- MichaelTempest - 17 Feb 2010
Topic revision: r7 - 17 Feb 2010, MichaelTempest
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy