aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
committerThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
commitc803fb90df3bbbd8bb88df09a271b5a9214e8c1d (patch)
tree0ad021580411798fc0ab025f1b1c302fe8afd3f6 /include/permissions.php
parent6999fb586ba90e9f1c79e9f09f4035f63fb925fd (diff)
parentb0dd38b30949f907265eda757bfa14aa1f38b38f (diff)
downloadvolse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.gz
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.bz2
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/permissions.php b/include/permissions.php
index e7f50ceeb..bf50ebdd1 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -328,3 +328,38 @@ function check_list_permissions($uid,$arr,$perm) {
return($result);
}
+
+
+function site_default_perms() {
+
+ $typical = array(
+ 'view_stream' => PERMS_PUBLIC,
+ 'view_profile' => PERMS_PUBLIC,
+ 'view_photos' => PERMS_PUBLIC,
+ 'view_contacts' => PERMS_PUBLIC,
+ 'view_storage' => PERMS_PUBLIC,
+ 'view_pages' => PERMS_PUBLIC,
+ 'send_stream' => PERMS_SPECIFIC,
+ 'post_wall' => PERMS_SPECIFIC,
+ 'post_comments' => PERMS_SPECIFIC,
+ 'post_mail' => PERMS_SPECIFIC,
+ 'post_photos' => 0,
+ 'tag_deliver' => PERMS_SPECIFIC,
+ 'chat' => PERMS_SPECIFIC,
+ 'write_storage' => 0,
+ 'write_pages' => 0,
+ 'delegate' => 0,
+ );
+
+
+ $global_perms = get_perms();
+ $ret = array();
+
+ foreach($global_perms as $perm => $v) {
+ $x = get_config('default_perms',$perm);
+ if($x === false)
+ $x = $typical[$perm];
+ $ret[$perm] = $x;
+ }
+ return $ret;
+}