aboutsummaryrefslogtreecommitdiff
path: root/models/model.php
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-10-19 18:52:07 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2011-10-19 18:52:07 +0200
commit9fe3317951c5582e381bc4ab7b6b21f54ec26b36 (patch)
tree91f89a9cf00bd3fc93ecf61c75402ab7e1133ed2 /models/model.php
parent52c341fb429b138f07cf99d1f5cde7ae8a86f8ee (diff)
downloadelgg-9fe3317951c5582e381bc4ab7b6b21f54ec26b36.tar.gz
elgg-9fe3317951c5582e381bc4ab7b6b21f54ec26b36.tar.bz2
check authority before displaying manage links
Diffstat (limited to 'models/model.php')
-rw-r--r--models/model.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/models/model.php b/models/model.php
index 51d4fb870..f2f48ca11 100644
--- a/models/model.php
+++ b/models/model.php
@@ -1469,12 +1469,17 @@ function event_calendar_get_page_content_view($event_guid) {
$content = elgg_echo('event_calendar:error_nosuchevent');
$title = elgg_echo('event_calendar:generic_error_title');
} else {
- event_calendar_handle_menu($event_guid);
$title = htmlspecialchars($event->title);
$event_container = get_entity($event->container_guid);
if (elgg_instanceof($event_container, 'group')) {
+ if ($event_container->canEdit()) {
+ event_calendar_handle_menu($event_guid);
+ }
elgg_push_breadcrumb(elgg_echo('event_calendar:group_breadcrumb'), 'event_calendar/group/'.$event->container_guid);
} else {
+ if ($event->canEdit()) {
+ event_calendar_handle_menu($event_guid);
+ }
elgg_push_breadcrumb(elgg_echo('event_calendar:show_events_title'),'event_calendar/list');
}