<HTML dir=ltr><HEAD><TITLE>Re: [pmwiki-users] easy question to all</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.5626" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText487 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>That worked like a charm!</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Chris</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Patrick R. Michaud [mailto:pmichaud@pobox.com]<BR><B>Sent:</B> Wed 10/15/2008 3:41 PM<BR><B>To:</B> Swift, Chris<BR><B>Cc:</B> PmWiki Users<BR><B>Subject:</B> Re: [pmwiki-users] easy question to all<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>On Wed, Oct 15, 2008 at 09:33:38AM +0200, Swift, Chris wrote:<BR>> Ok, for some reason I still can't edit freely in pages that are already<BR>> created. I still need the group password to edit anything. Could that be<BR>> because $DefaultPasswords['edit'] ? Maybe should I set this per group?<BR>> $DefaultPasswords['Main'] = crypt('group_creation_password'); for example?<BR><BR>Note that the code I gave depends on the existence of a page called<BR>"HomePage" in whatever group the page being edited belongs to. So,<BR>if you try to edit Group.ABC and Group.HomePage doesn't exist, then it'll<BR>look for the group password.<BR><BR>Perhaps a better approach would be:<BR><BR> $pagename = ResolvePageName($pagename);<BR> $rc = FmtPageName('$Group.HomePage', $pagename);<BR> if (!PageExists($pagename) && !PageExists($rc))<BR> $DefaultPasswords['edit'] = crypt('group_creation_password');<BR><BR>This requires the group creation password if the page being edited<BR>doesn't exist *and* there's not a HomePage for the group.<BR><BR>Pm<BR><BR><BR><BR>> On Tue, Oct 14, 2008 at 05:23:42PM +0200, Swift, Chris wrote:<BR>> > Also, I would prefer to create a password in order to create new<BR>> > groups, instead of leaving it only to admin. That way I could<BR>> > still empower "moderators" but not give everyone access to create<BR>> > new groups. Any ideas would be appreciated...<BR>><BR>> $pagename = ResolvePageName($pagename);<BR>> $rc = FmtPageName('$Group.HomePage', $pagename);<BR>> if (!PageExists($rc))<BR>> $DefaultPasswords['edit'] = crypt('group_creation_password');<BR>><BR>> Pm<BR>><BR></FONT></P></DIV></BODY></HTML>