IP Group Plugin

Compatible with DokuWiki

  • 2012-01-25 "Angua" unknown
  • 2011-05-25 "Rincewind" yes
  • 2010-11-07 "Anteater" yes

plugin Allows administrators to map (anonymous) users from specified networks to a single group.

Last updated on
2011-11-14
Provides
Admin, Action
Repository
Source

Similar to iptrust

Tagged with acl, groups, ip

This plugin allows administrators to map (anonymous) users to a group. Users accessing the wiki from the specified network will be added to the given virtual group.

Download

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.

Changes

  • use plugin for RSS-Feeds (2011/04/07)
    (purge of feedcache is recommend: find data/cache/ -name *.feed | xargs rm)
  • use plugin for AJAX-based search (2011/05/22)
  • use plugin for Media-Manager (2011/10/19)
  • use plugin for Media-Details (2011/11/09)
  • fixed errormessage with empty config file (2011/11/14, thx to Marc Theilhaber)

Known Issues

Media Access

The plugin did not work for media/file access (depends on Bug #2103) and media details.

Solution/Patches

fetch.php.patch
--- lib/exe/fetch.php.old   2011-01-16 19:04:09.000000000 +0100
+++ lib/exe/fetch.php   2011-06-20 21:04:34.993547069 +0200
@@ -27,6 +27,10 @@
     $DL   = true;
   }

+  $evt = new Doku_Event('MEDIA_SENDFILE_PREPROCESS', $data);
+  if (!$evt->advise_before())
+    exit;
+
   // check for permissions, preconditions and cache external files
   list($STATUS, $STATUSMESSAGE) = checkFileStatus($MEDIA, $FILE);
 
detail.php.patch
--- lib/exe/detail.php.orig     2011-11-09 20:57:56.845166714 +0100
+++ lib/exe/detail.php  2011-10-20 12:29:14.442462847 +0200
@@ -5,6 +5,10 @@
 //close session
 session_write_close();
 
+$evt = new Doku_Event('MEDIA_DETAIL_PREPROCESS', $data);
+if (!$evt->advise_before())
+  exit;
+
 $IMG  = getID('media');
 $ID   = cleanID($_REQUEST['id']);
 
ipgroup-action.php.patch
--- lib/plugins/ipgroup/action.php.orig 2011-11-09 20:52:43.280744547 +0100
+++ lib/plugins/ipgroup/action.php      2011-11-09 20:55:05.626565921 +0100
@@ -36,6 +36,8 @@
         $controller->register_hook('FEED_OPTS_POSTPROCESS', 'BEFORE', $this, 'start');
         $controller->register_hook('SEARCH_QUERY_PAGELOOKUP', 'BEFORE', $this, 'start');
         $controller->register_hook('MEDIAMANAGER_STARTED', 'BEFORE', $this, 'start');
+        $controller->register_hook('MEDIA_SENDFILE_PREPROCESS', 'BEFORE', $this, 'start');
+        $controller->register_hook('MEDIA_DETAIL_PREPROCESS', 'BEFORE', $this, 'start');
     }
 
     function start(&$event, $param) {
plugin/ipgroup.txt · Last modified: 2012/04/03 10:40 by einhirn
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate