DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:adminplugin_access_check

ADMINPLUGIN_ACCESS_CHECK

Description:
Allows to intercept and change the access to admin plugins
DefaultAction:
grant access based on admin/manager status
Preventable:
yes
Added:
2018-12-10

This event is signalled by isAccessibleByCurrentUser() in inc/Extension/AdminPlugin.php when the access to an admin plugin is checked, handlers can use it to let non-admin/non-managers access an Admin Plugin.

Passed Data

The passed $data is an associative array with two keys:

  • $data['instance'] is a reference to the instantiated admin plugin in question
  • $data['hasAccess'] this is what you may want to override. true grants access to the plugin, false denies it. This is false in the BEFORE handler. In the AFTER handler it is set to the result of the normal amdin/manager check.

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/adminplugin_access_check.txt · Last modified: 2020-06-24 22:50 by Klap-in

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