DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:ondeniedlogin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:ondeniedlogin [2011-08-26 17:01] – added patch for search on denied einhirnplugin:ondeniedlogin [2018-06-05 19:04] (current) Klap-in
Line 1: Line 1:
-====== ondeniedlogin plugin ======+====== ondeniedlogin Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 11: Line 11:
 conflicts  conflicts 
 similar    : showlogin similar    : showlogin
-tags       : redirect authentication+tags       : redirectauthentication, denied, !obsolete
  
 downloadurl: http://samfisch.de/_media/documentation/sfdom/plugins/dokuplugin-ondeniedlogin.tgz downloadurl: http://samfisch.de/_media/documentation/sfdom/plugins/dokuplugin-ondeniedlogin.tgz
 ---- ----
  
 +**Functionality now included in DokuWiki**: Dokuwiki now includes the login form in the denied page, when useful. So this plugin is obsolete.
 +
 +>__EDIT by //asheenlevrai// on 20140924__: Well I do not completely agree although the above is true for most users. On the 2014 version of dokuwiki (Ponder Stibbons) the **denied page** now includes the login __form__, while this plugin redirects to the **login page** whenever someone ends up on the denied page. People who use a customized version of the login page (for instance when using the plugin [[plugin:legalnotice|legal notice]] may still want to have the login page rather than the permission denied page displayed at all times since the new (2014) denied page will not include these customizations.
 +>> Fixed in [[plugin:legalnotice|legal notice]] for some time now - it also listens to "denied" action and will display it's text there, too.  --- [[user>einhirn|Christian Marg]] //2016-08-22 10:46//
 ===== Download and Installation ===== ===== Download and Installation =====
 +FIXME Downloads have error. Missing "php" in first line. Use copy and paste method or edit the file noted in copy and paste method.
 +
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. 
  
   * http://samfisch.de/_media/documentation/sfdom/plugins/dokuplugin-ondeniedlogin.tgz   * http://samfisch.de/_media/documentation/sfdom/plugins/dokuplugin-ondeniedlogin.tgz
  
-Or copy paste this code into your lib/plugins/ondeniedlogin/action.php .+Refer to [[:Plugins]] on how to install plugins manually. Or copy paste this code into your lib/plugins/ondeniedlogin/action.php .
  
 <code php action.php> <code php action.php>
Line 43: Line 49:
     }     }
  
-  function register(&$controller) {+  function register(Doku_Event_Handler $controller) {
       $controller->register_hook('TPL_ACT_RENDER', 'BEFORE',  $this, 'ondeniedlogin');       $controller->register_hook('TPL_ACT_RENDER', 'BEFORE',  $this, 'ondeniedlogin');
     }     }
Line 58: Line 64:
 </code> </code>
  
-==== Patches ====+===== Patches ===== 
 + 
 +==== Show Search Page for Authenticated Users ====
  
 This adds the following functionality to this plugin: When your ACLs allow someone to see some pages but maybe not the start page, this helps him because he gets some search hits instead of "Permission denied"... This adds the following functionality to this plugin: When your ACLs allow someone to see some pages but maybe not the start page, this helps him because he gets some search hits instead of "Permission denied"...
  
-<code php ondenied-search.patch>+<code diff ondenied-search.patch>
 --- ondeniedlogin/action.php    2011-08-26 16:47:00.000000000 +0200 --- ondeniedlogin/action.php    2011-08-26 16:47:00.000000000 +0200
 +++ ondeniedlogin/action.php    2011-08-26 16:54:23.000000000 +0200 +++ ondeniedlogin/action.php    2011-08-26 16:54:23.000000000 +0200
Line 77: Line 85:
 </code> </code>
  
 +==== Use Earlier Event ====
 +
 +Some templates (e.g. [[template:dokuwiki]]) set html classes on outer elements describing the action.  The TPL_ACT_RENDER event is too late to alter this.  The change below switches to use [[devel:event:ACTION_HEADERS_SEND]], so immediately after DokuWiki sends the 403 permission denied header.
 +
 +<code php>
 +      $controller->register_hook('ACTION_HEADERS_SEND', 'AFTER',  $this, 'ondeniedlogin');
 +</code>
plugin/ondeniedlogin.1314370907.txt.gz · Last modified: 2011-08-26 17:01 by einhirn

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki