diff --git a/mod/page.php b/mod/page.php index e1274fff6..51b292f37 100644 --- a/mod/page.php +++ b/mod/page.php @@ -22,6 +22,17 @@ function page_init(&$a) { function page_content(&$a) { + $observer = $a->get_observer(); + $ob_hash = (($observer) ? $observer['xchan_hash'] : ''); + + $perms = get_all_perms($a->profile['profile_uid'],$ob_hash); + + if(! $perms['view_pages']) { + notice( t('Permission denied.') . EOL); + return; + } + + if(argc() < 3) { notice( t('Invalid item.') . EOL); return; diff --git a/view/tpl/404.tpl b/view/tpl/404.tpl index 2d581ab8d..518ad1d29 100755 --- a/view/tpl/404.tpl +++ b/view/tpl/404.tpl @@ -1,6 +1 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}}