From 7fe8b61374b19c198a95eb97246c0879d6b25802 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 28 Jan 2012 07:56:09 -0500 Subject: Fixes #4329 removed old recursive delete permissions override --- engine/lib/entities.php | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 0b229aac5..4875b2c2f 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2178,29 +2178,6 @@ function elgg_list_registered_entities(array $options = array()) { return elgg_view_entity_list($entities, $options); } -/** - * Check the recursive delete permissions token. - * - * If an entity is deleted recursively, a permissions override is required to allow - * contained or owned entities to be removed. - * - * @return bool - * @elgg_plugin_hook_handler permissions_check all - * @elgg_plugin_hook_handler permissions_check:metadata all - * @access private - */ -function recursive_delete_permissions_check() { - static $__RECURSIVE_DELETE_TOKEN; - - if ((elgg_is_logged_in()) && ($__RECURSIVE_DELETE_TOKEN) - && (strcmp($__RECURSIVE_DELETE_TOKEN, md5(elgg_get_logged_in_user_guid())))) { - return true; - } - - // consult next function - return NULL; -} - /** * Checks if $entity is an ElggEntity and optionally for type and subtype. * @@ -2315,11 +2292,6 @@ function entities_init() { elgg_register_plugin_hook_handler('unit_test', 'system', 'entities_test'); - // Allow a permission override for recursive entity deletion - // @todo Can this be done better? - elgg_register_plugin_hook_handler('permissions_check', 'all', 'recursive_delete_permissions_check'); - elgg_register_plugin_hook_handler('permissions_check:metadata', 'all', 'recursive_delete_permissions_check'); - elgg_register_plugin_hook_handler('gc', 'system', 'entities_gc'); } -- cgit v1.2.3