From 4bcf19632bc5158095a5d2d5d63dea1b25b146b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 28 Oct 2012 18:50:35 -0700 Subject: Now have a solid permissions model. Create a few functions to enumerate them and then we're off to the races. --- boot.php | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 10f1cddc7..d7b51867f 100644 --- a/boot.php +++ b/boot.php @@ -8,6 +8,7 @@ require_once('include/datetime.php'); require_once('include/language.php'); require_once('include/nav.php'); require_once('include/cache.php'); +require_once('include/permissions.php'); require_once('library/Mobile_Detect/Mobile_Detect.php'); require_once('include/BaseObject.php'); @@ -182,6 +183,14 @@ define ( 'PERMS_CONTACTS' , 0x0008 ); define ( 'PERMS_SPECIFIC' , 0x0080 ); +// Address book flags + +define ( 'ABOOK_FLAG_BLOCKED' , 0x0001); +define ( 'ABOOK_FLAG_IGNORED' , 0x0002); +define ( 'ABOOK_FLAG_HIDDEN' , 0x0004); + + + /** * Maximum number of "people who like (or don't like) this" that we will list by name */ @@ -394,11 +403,11 @@ if(! class_exists('App')) { class App { - public $account = null; // account record - - private $channel = null; // channel record - private $observer = null; // xchan record - private $widgets = array(); // widgets for this page + public $account = null; // account record + private $channel = null; // channel record + private $observer = null; // xchan record + private $perms = null; // observer permissions + private $widgets = array(); // widgets for this page @@ -654,6 +663,14 @@ if(! class_exists('App')) { return $this->observer; } + function set_perms($perms) { + $this->perms = $perms; + } + + function get_perms() { + return $this->perms; + } + function get_apps() { return $this->apps; } -- cgit v1.2.3