[ewiki] Re: auth plugins: new page access (was Re: Re: auth_ perm_unix: new pages access)
- From: Andy Fundinger <andy@xxxxxxxxxxx>
- To: "'ewiki@xxxxxxxxxxxxx'" <ewiki@xxxxxxxxxxxxx>
- Date: Thu, 4 Mar 2004 17:32:29 -0500
> -----Original Message-----
> From: Mario Salzer [mailto:mario@xxxxxxxxxxxxx]
> Sent: Thursday, March 04, 2004 4:00 PM
> To: ewiki@xxxxxxxxxxxxx
> Subject: [ewiki] Re: auth plugins: new page access (was Re: Re: auth_
> perm_unix: new pages access)
>
> > > However if this was really that important, we could add a plugin hook
> > > from within edit/, which signalised page creation to a few plugins(?)
> >
> > This does not work nearly as well, one of the significant benefits is to
> > have the auth main auth call authenticate for creation.
>
> Great! Why didn't you say that earlier?! ;)
1. The main auth call in my terminology is the one in ewiki_page(). If the
action has not been changed to "create" by that point we will need a work
around inside the ewiki_auth() system somewhere.
> I think this was a very nice feature to have, but we shouldn't
> pollute the global plugin scope with it. Eventually it was the
> best solution to make the ewiki_auth() call change "edit" into
> "create" (only internally for the auth plugin stack) by adding
> one of the possible detection strategies.
> This way the main plugins still would only pass "edit" around,
> but the auth plugins would see "create" if so.
>
> If we could not add this in ewiki_auth(), then probably inside
> of edit/, by slightly modifying the _auth call? Sounds too simple
> to not to do it.
The main benefits from adding a create action IMOWRCH are exactly from
polluting the global scope with it. Some possible uses:
* Making your aedit_template plugin appear and run only on page creation.
* Allowing my "edit_append" manage plugins (in perm_liveuser) to give the
original author extra abilities to setup the rights for a page when they
create a page.
* Allowing a different editor to be used for creation i.e. choice of upload
a file, copy a page, start fresh, create a forum...
* Flagging page creation in the logs.
* You may want... search as described below.
As for modifying the _auth call, please explain how you would do this to
avoid stumbling over the fact that you may or may not be getting data in
$data.
> > > I've recently had the idea of a PageTemplateList plugin (aedit), where
> > > it doesn't look like much overhead of not having a special "create"
> > > action. - The check for {version} currently seems to do the trick.
> >
> > That's a great plugin that I probably will use, but the plugin I was
> > considering was a search-based plugin to prevent people from creating
> new
> > pages that duplicate existing pages.
>
> The template thing is in CVS.
> Your idea was about a content-duplication-prevention plugin? I'm not
> sure if the SEARCH call would help here, sounds difficult. But also
> sometimes it is necessary to move content from one page to another,
> so temporarily parts of a page are dublettes in a Wiki.
The notion, admittedly selected as an example, would be to show users a list
of "similar pages" based on the page name they would like to create above or
alongside the edit controls to create a new page.
Andy
Other related posts: