[pmwiki-users] auto-assign attributes to a page with given name
noskule
noskule at gmx.net
Wed Sep 3 12:17:33 CDT 2008
Peter Bowers schrieb:
> On Sun, Aug 24, 2008 at 11:58 AM, Peter Bowers <pbowers at pobox.com> wrote:
>> The 2nd is probably OK, but the 1st may be an issue for you... If so,
>> you might take a look at "the other side" of $EditFunctions and add a
>> function to the end, perhaps modeled after AutoCreateTargets(), which
>> would automatically create the GroupConfig page with the password if
>> it doesn't exist... (This would still not prevent someone creating
>> the group by creating GROUP.GroupConfig and they still would not need
>> admin authorization, but at least it would have to be the *first* page
>> created...)
>
> I put together a recipe at [[Cookbook/AutoCreatePages]] which follows
> this last possibility.
yes, this is just perfect, thanks very mutch.
grz nos
It still leaves the possibility of creating
> GROUP.GroupConfig as the very first page in a group without being
> prevented by passwd authorization, but it seems like an effective way
> to create new pages dependent on the page being edited...
>
> One other possibility would be to set $DefaultPasswd dependent on the $pagename:
>
> if (strstr("GroupConfig", $pagename))
> $DefaultPasswords['edit'] = 'mysecret';
>
> That seems like it would work in the immediate situation - I just
> don't know the ramifications if other recipes check for authorizations
> on *other* pages while you are editing GroupConfig...
>
> -Peter
>
More information about the pmwiki-users
mailing list