splitbrain/dokuwiki — pull request #129 by pengi (2012-09-03 16:14:24+00:00)
Title: The ACL today is hardcoded into auth.php, and would be nice to handle as a plugin

ACLs today has two parts:
- Configuraiton
- Checking

The configuration is today done within an acl plugin, which presents itself as an admin plugin, so this plugin can be removed and be replaced.

The acl checking is made in inc/auth.php in the method auth_aclcheck. This can not easily be replaced by a plugin.

This pull request implements a stub auth_aclcheck which triggers an event for acl checking. The stub ACL test always denies access, for security reasons, and the acl plugin overrides the default behaviour and implements ACL as an acion/event handler.

The reson for this is that it is possible to replace the ACL handler.

We're using dokuwiki integrated to a more complex system, where permission is set for users to objects, and each object get a namespace within the wiki. The number of objects is also that big that we don't want to list them in the ACL configuration file.

So we want to override the ACL behaviour with a plugin where we can hardcode some pattern for namespaces and permissions to match our project, and therefore we want to remove the acl in this system and add our own, making this patch useful.

This patch shouldn't change the default behaviour of dokuwiki, but just make it possible to add possibilities for advanced users to integrate not only authentication, but also authorization, to existing systems.