It's better when it's simple

User Tools

Site Tools



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

Link to this comparison view

devel:event:adminplugin_access_check [2018-12-10 11:39] (current)
andi created
Line 1: Line 1:
 +---- dataentry event ----
 +Description:    Allows to intercept and change the access to admin plugins
 +DefaultAction:  grant access based on admin/manager status
 +Preventable:    yes
 +Added_dt:       2018-12-10
 +This event is signalled by ''isAccessibleByCurrentUser()'' in [[xref>lib/plugins/admin.php]] when the access to an admin plugin is checked, handlers can use it to let non-admin/non-managers access an [[devel:admin_plugins|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.
 +  * FIXME
 +===== See also =====
 +  * [[codesearch>ADMINPLUGIN_ACCESS_CHECK|Code related to this event]]
 +  * [[devel:Action Plugins]]
 +  * [[devel:Events]]
devel/event/adminplugin_access_check.txt ยท Last modified: 2018-12-10 11:39 by andi