Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #4329 removed old recursive delete permissions override

  • Loading branch information...
commit 7fe8b61374b19c198a95eb97246c0879d6b25802 1 parent 1a7482c
@cash cash authored
Showing with 0 additions and 28 deletions.
  1. +0 −28 engine/lib/entities.php
View
28 engine/lib/entities.php
@@ -2179,29 +2179,6 @@ function elgg_list_registered_entities(array $options = array()) {
}
/**
- * 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.
*
* @tip Use this function in actions and views to check that you are dealing
@@ -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');
}
Please sign in to comment.
Something went wrong with that request. Please try again.