[pmwiki-users] how to make pages in the group 'Project' accessible only from one fixed IP

Farkas, Illes fij at elte.hu
Thu Oct 8 08:25:44 CDT 2009


Hi,

Thanks for your previous help with page editing permissions.

This time I would like to make pages in the group 'Project' (for example,
Project.Data, Project.Meetings, Project.Deadlines) accessible only to
visitors from a fixed IP number.

If any other visitor tries to access 'Project' pages, then they should
receive the page Main.HomePage instead.

Shall I put something like this into local/config.php ?

if ( <group is 'Project' -- how to write this?> && @$_SERVER['REMOTE_ADDR']
!= '<selected IP>'){
      <instead of the requested page set page to 'Main.HomePage'>
}

Thanks,
Illes

On Thu, Sep 25, 2008 at 9:21 AM, Farkas, Illes <illes.farkas at gmail.com>wrote:

> Thanks,
> Illes
>
> On Wed, Sep 24, 2008 at 8:21 PM, Patrick R. Michaud <pmichaud at pobox.com>wrote:
>
>> On Wed, Sep 24, 2008 at 06:00:17PM +0200, Farkas, Illes wrote:
>> > Dear PmWiki Users,
>> >
>> > Is it possible to allow editing only from one selected IP (and disallow
>> from
>> > all others) ?
>>
>> In config.php:
>>
>> if ($action == 'edit' && @$_SERVER['REMOTE_ADDR'] != '192.168.1.1')
>>  $action = 'browse';
>>
>> This will prevent editing from any address other than 192.168.1.1.
>>
>> Pm
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20091008/d3f38dce/attachment.html 


More information about the pmwiki-users mailing list