aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/access.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-07-03 16:52:33 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-07-03 16:52:33 -0400
commitb3bad6fc928cae56bdc3a97fe8089b27f6f79f0b (patch)
tree64705da025631fee455c05b2419374c22e120df1 /engine/lib/access.php
parenta91f3c32d6f7295163c6421682d84689e1e7f3e5 (diff)
downloadelgg-b3bad6fc928cae56bdc3a97fe8089b27f6f79f0b.tar.gz
elgg-b3bad6fc928cae56bdc3a97fe8089b27f6f79f0b.tar.bz2
Merged d423aee393458d6827db from 1.7 to master.
Fixes #3552. Addess ACL unit tests. These currently fail because of #3522. git-svn-id: http://code.elgg.org/elgg/branches/1.7@9202 36083f99-b078-4883-b0ff-0f9b5a30f544 Conflicts: engine/lib/access.php
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r--engine/lib/access.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index cde3d256f..303152816 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -956,9 +956,20 @@ function elgg_override_permissions_hook() {
return NULL;
}
+/**
+ * Runs unit tests for the entities object.
+ */
+function access_test($hook, $type, $value, $params) {
+ global $CONFIG;
+ $value[] = $CONFIG->path . 'engine/tests/api/access_collections.php';
+ return $value;
+}
+
// This function will let us know when 'init' has finished
elgg_register_event_handler('init', 'system', 'access_init', 9999);
// For overrided permissions
elgg_register_plugin_hook_handler('permissions_check', 'all', 'elgg_override_permissions_hook');
elgg_register_plugin_hook_handler('container_permissions_check', 'all', 'elgg_override_permissions_hook');
+
+elgg_register_plugin_hook('unit_test', 'system', 'access_test');