[pmwiki-users] rename (Nicolas Poulain)
john.rankin at affinity.co.nz
Tue Sep 25 17:43:37 CDT 2007
On Wednesday, 26 September 2007 5:00 AM, pmwiki-users-request at pmichaud.com wrote:
> 2. Rename (Nicolas Poulain)
>When a user is facing the ?action=rename form, he can see the whole list
>of existing groups, even the groups he's not allowed to view (and so to
>move the page in).
>I'd like the form to show only the groups the user has the permission to
>view. Where has the rename.php script to be modified ?
>I guess it is in the lines following but i'm not able to do it
> "<h1 class='wikiaction'>$[Rename] <a
> <form action='\$PageUrl' method='post'>
> <input type='hidden' name='n' value='\$FullName' />
> <input type='hidden' name='action' value='postrename' />
> <input type='text' name='renametext' value='\$Name' size='25' /><br/>
> $[Add:] <input type='radio' name='addgroup' value=''
> <input type='radio' name='addgroup' value='\$Group' /><em>\$Group</em>
> <input type='radio' name='addgroup' value='new' /><em>$[new
>group]</em> $[to any Unqualified Links]
> <input type='submit' value='$[Rename]' /></form>
> <p class='vspace'></p><p>$[Unqualified Links]:</p>
>Thank you for any help.
I don't have the answer, but here is what the code does.
It is a while since I looked at it...
It uses the standard pmwiki function ListPages to gather a
list of all pages, from which it builds and formats a pick
list of groups. So how does one determine whether the user
is authorised to view/edit a particular group? If someone
can answer that question, the rest is fairly easy -- we
add "if renameauthrised($group) ... else ..." to omit
the names of unauthorised groups from the pick list.
| & * Wellington
More information about the pmwiki-users