aboutsummaryrefslogtreecommitdiffstats
path: root/mod/page.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
commit03357481f73d506ae36be9858dc757842408c6a9 (patch)
treea69772d6caf71f4986a26eb80d00ac4e8750b995 /mod/page.php
parentec1dcb8f2eccfd1a0dfc9c7eccea788a4b385e41 (diff)
parent805e2a28ee81febee2742587a1640b5fae1387a2 (diff)
downloadvolse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.gz
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.bz2
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: install/schema_mysql.sql mod/home.php mod/page.php view/nl/messages.po view/nl/strings.php
Diffstat (limited to 'mod/page.php')
-rw-r--r--mod/page.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/page.php b/mod/page.php
index c37dc7d0b..b635a60f2 100644
--- a/mod/page.php
+++ b/mod/page.php
@@ -11,10 +11,11 @@ function page_init(&$a) {
$profile = 0;
profile_load($a,$which,$profile);
- if($a->profile['profile_uid'])
- head_set_icon($a->profile['thumb']);
+ if($a->profile['profile_uid'])
+ head_set_icon($a->profile['thumb']);
+
// load the item here in the init function because we need to extract
// the page layout and initialise the correct theme.
@@ -22,9 +23,11 @@ function page_init(&$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']) {
+ // perm_is_allowed is denied unconditionally when 'site blocked to unauthenticated members'.
+ // This bypasses that restriction for sys channel (public) content
+
+ if((! perm_is_allowed($a->profile['profile_uid'],$ob_hash,'view_pages')) && (! is_sys_channel($a->profile['profile_uid']))) {
notice( t('Permission denied.') . EOL);
return;
}
@@ -77,6 +80,7 @@ function page_init(&$a) {
dbesc($page_id),
intval(ITEM_TYPE_WEBPAGE)
);
+
if($x) {
// Yes, it's there. You just aren't allowed to see it.
notice( t('Permission denied.') . EOL);