aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2014-03-08 19:11:23 +0000
committerThomas Willingham <founder@kakste.com>2014-03-08 19:11:23 +0000
commitd9fd2a20c87d389d93005de6bce56c6c75311977 (patch)
treefc5a006610a08939b134df0012c03b78b68b2368
parentaa8a93f1710f463f9467610cbcdc1cb754551c78 (diff)
downloadvolse-hubzilla-d9fd2a20c87d389d93005de6bce56c6c75311977.tar.gz
volse-hubzilla-d9fd2a20c87d389d93005de6bce56c6c75311977.tar.bz2
volse-hubzilla-d9fd2a20c87d389d93005de6bce56c6c75311977.zip
is_developer() for those awkward "Don't touch this yet unless
you know what you're doing" commits - especially the ones with UI components.
-rwxr-xr-xboot.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index e368896ca..a5a48b2bf 100755
--- a/boot.php
+++ b/boot.php
@@ -491,7 +491,7 @@ define ( 'ACCOUNT_PENDING', 0x0010 );
define ( 'ACCOUNT_ROLE_ALLOWCODE', 0x0001 );
define ( 'ACCOUNT_ROLE_SYSTEM', 0x0002 );
-
+define ( 'ACCOUNT_ROLE_DEVELOPER', 0x0004 );
define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 );
/**
@@ -1704,6 +1704,15 @@ function is_site_admin() {
return false;
}
+function is_developer() {
+ $a = get_app();
+ if((intval($_SESSION['authenticated']))
+ && (is_array($a->account))
+ && ($a->account['account_roles'] & ACCOUNT_ROLE_DEVELOPER))
+ return true;
+ return false;
+}
+
function load_contact_links($uid) {