[dokuwiki] Re: Configuration settings and Auth plugin refactoring?

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 15 May 2006 23:39:00 +0100

Ben Coburn wrote:

I've been thinking about this carefully and I think this should go in the opposite direction. To my mind the configuration plugin is intended to provide a user friendly interface for wiki users (not developers). Settings that do not have the minimum of a metadata entry defining their input type (and a language string) are probably too close to the code to be exposed to normal wiki users.

Here's how I would currently handle it:
- Hide ('undefined') configuration settings that do not have a metadata entry.
- When the wiki has $conf['allowdebug']==true list the 'undefined' settings at the end of the configuration list. This will help developers catch settings that need metadata.
- Add a 'hidden' setting type to explicitly hide a setting (without leaving it 'undefined').

I understand what and why you are saying. Philosophically, I would go the other way - and have a system that is as helpful as possible if there is no metadata. Hiding a setting because there is no metadata seems wrong to me. Its still a setting, requiring the admin to have a second method of editing the file for some settings doesn't seem right.


If you implement what you are happy with, I'll probably patch something for myself and make it available.


2) Refactor auth classes to auth plugins.
How about refactoring the auth classes into a new auth plugin type? The authorization back-ends already have a class hierarchy so this should be fairly simple. Some benefits:
- Auth types get a folder to store related resources.
- Auth types can cleanly use the configuration settings plugin.
- Custom auth types can be installed and updated with the plugin manager plugin.


I have mixed thoughts about this. Basically, its really sensible and I should have done the backends as plugins when the system was redone. Given the backends have all just been rewritten, I am not sure its worth changing them again so soon - unless the authors are happy to revisit them whilst they are still fresh in their minds.

A halfway solution may be to keep the settings and metadata in the inc/auth directory and use a structured file name.

<auth_name>.class.php
<auth_name>.default.php
<auth_name>.metadata.php
(and put the language strings somewhere ....

Writing this, I can see having a proper auth plugin would be handy. It would mean they were downloadable and installable. Language strings could be handled easily.

I would appreciate a little feedback on this. Andi, Chris, ...? I will probably go ahead with the settings changes, but what about the auth plugins?

I think we need to hear from the auth authors.

Cheers,

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: