Now have a solid permissions model. Create a few functions to enumerate them and then we're off to the races.

This commit is contained in:
friendica
2012-10-28 18:50:35 -07:00
parent 1a9ab12748
commit 4bcf19632b
6 changed files with 367 additions and 101 deletions
+22 -5
View File
@@ -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;
}