Observer permissions (but not ACL yet) for webpages.
This commit is contained in:
parent
328ebda77a
commit
3743d5ca79
11
mod/page.php
11
mod/page.php
@ -22,6 +22,17 @@ function page_init(&$a) {
|
|||||||
|
|
||||||
function page_content(&$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) {
|
if(argc() < 3) {
|
||||||
notice( t('Invalid item.') . EOL);
|
notice( t('Invalid item.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user