summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorlisps <stummp@loewen.de>2014-02-17 23:15:36 +0100
committerlisps <stummp@loewen.de>2014-02-17 23:15:36 +0100
commitd90a79c0ee1837353622e4b2abb0753ca09dffd2 (patch)
tree554da8dc13606efc2bc1ea7fe3697a5ff87d02e5 /inc/auth.php
parentf2643d9ff318af1d2fbb6249e929212381959247 (diff)
parenta83975113c7725a13144b3e65bfb58c8447d37d7 (diff)
downloadrpg-d90a79c0ee1837353622e4b2abb0753ca09dffd2.tar.gz
rpg-d90a79c0ee1837353622e4b2abb0753ca09dffd2.tar.bz2
Merge remote-tracking branch 'origin/diff_navigation' into revisions
Conflicts: inc/parser/xhtml.php
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php28
1 files changed, 25 insertions, 3 deletions
diff --git a/inc/auth.php b/inc/auth.php
index b793f5d12..6000ea6d7 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -661,17 +661,39 @@ function auth_quickaclcheck($id) {
}
/**
- * Returns the maximum rights a user has for
- * the given ID or its namespace
+ * Returns the maximum rights a user has for the given ID or its namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
- *
+ * @triggers AUTH_ACL_CHECK
* @param string $id page ID (needs to be resolved and cleaned)
* @param string $user Username
* @param array|null $groups Array of groups the user is in
* @return int permission level
*/
function auth_aclcheck($id, $user, $groups) {
+ $data = array(
+ 'id' => $id,
+ 'user' => $user,
+ 'groups' => $groups
+ );
+
+ return trigger_event('AUTH_ACL_CHECK', $data, 'auth_aclcheck_cb');
+}
+
+/**
+ * default ACL check method
+ *
+ * DO NOT CALL DIRECTLY, use auth_aclcheck() instead
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @param array $data event data
+ * @return int permission level
+ */
+function auth_aclcheck_cb($data) {
+ $id =& $data['id'];
+ $user =& $data['user'];
+ $groups =& $data['groups'];
+
global $conf;
global $AUTH_ACL;
/* @var DokuWiki_Auth_Plugin $auth */