[pmwiki-users] edit perms in Profiles
noskule
noskule at gmx.net
Tue Jul 3 23:59:37 CDT 2007
H. Fox schrieb:
> On 7/3/07, noskule <noskule at gmx.net> wrote:
>> hi list
>> is there a way to limit edit permission in the profiles group only for
>> pages with the same name as the authors name, ie
>>
>> UserA can only edit Profiles.UserA but not Profiles.UserB
>
> Try this local/Profiles.php script:
>
> <?php if (!defined('PmWiki')) exit();
> ## Author's name must match the page name in order to edit.
> if ($action == 'edit' && ! CondAuth(@$pagename, 'admin')) {
> @include_once($FarmD.'/scripts/author.php');
> if ($Author && $Author != @PageVar($pagename, '$Name')) {
> $action='browse'; }
> }
>
> Hagan
>
hi hagan
thanks for the snipset, this basically work, but there is an issue. If a
user tries to edit a other users profiles page it doesn't show a "don't
have permission" message with the login screen but shows the page.
That's not to bad, but also the if directive dosn't work (:if auth
edit:) is true on every profiles page.
Is there a way around this
thanks nos
More information about the pmwiki-users
mailing list