DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:auth_acl_check

Table of Contents

AUTH_ACL_CHECK

description:
Wraps around checking the ACLs for a user on a given page, a media or namespace
defaultaction:
The standard DokuWiki ACL checking mechanism
preventable:
yes
added:
2014-01-19

This event is signalled by auth_aclcheck() in inc/auth.php when the ACLs for a page, a media or namespace are checked, handlers can use it to modify the result in the AFTER action or implement their own ACL checking in the BEFORE action.

There is no way to know what is checked (in this event) because the ACL system doesn't care. ACLs apply to media and pages. (Ref)

Passed Data

The passed Doku_Event object has the fields: $data and $result.

The following data is available in the $event->data array:

array(
   id => string,                        // the page or namespace that is checked
   user => string,                      // the user the ACLs apply to
   groups => array(string, string, ...) // the groups above user is member of
)

BEFORE handlers should return one of the AUTH_* constants and prevent the default action auth_aclcheck_cb(). AFTER handlers can check the default action's result in the $event->result field and modify it there.

See also

devel/event/auth_acl_check.txt · Last modified: 2023-02-28 22:32 by Aleksandr

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