Permalink
Browse files

fix(menus): delete menu item is only registered if canDelete is fullf…

…illed

Entity menu setup now checks ElggEntity::canDelete() permission before registering the delete
menu item
  • Loading branch information...
hypeJunction committed Dec 8, 2015
1 parent 84cbb15 commit e13ba51182fed1deed1774840601733e299d5195
Showing with 2 additions and 0 deletions.
  1. +2 −0 engine/lib/navigation.php
@@ -485,7 +485,9 @@ function _elgg_entity_menu_setup($hook, $type, $return, $params) {
'priority' => 200,
);
$return[] = \ElggMenuItem::factory($options);
}
if ($entity->canDelete() && $handler) {
// delete link
if (elgg_action_exists("$handler/delete")) {
$action = "action/$handler/delete";

0 comments on commit e13ba51

Please sign in to comment.