aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-04 17:11:02 -0800
committerfriendica <info@friendica.com>2014-11-04 17:11:02 -0800
commitd5d6158973ecb83b63d42c57c96dce849842c83b (patch)
tree354abb2b3fefcb4c61fd1a87f7c37e82ae8c70f8 /include/follow.php
parent7a92157187c59ae68eb585e5bd0ae1d7c9aa6162 (diff)
downloadvolse-hubzilla-d5d6158973ecb83b63d42c57c96dce849842c83b.tar.gz
volse-hubzilla-d5d6158973ecb83b63d42c57c96dce849842c83b.tar.bz2
volse-hubzilla-d5d6158973ecb83b63d42c57c96dce849842c83b.zip
ok heads up - potentially destabilising change. I've tried to sort out all the default connection permissions for those who don't have a predefined (or therefore have a "custom") permissions role. Unfortunately this includes most people that were using this software more than a month ago. The real changes are that the SELF address book entry no longer holds "auto-permissions" but instead holds your "default permissions" (if you have a pre-defined role, the defaults will be pulled from the role table).
The auto permissions have moved to a pconfig (uid.system.autoperms). A DB update will move these settings into their new homes. What used to be the "Auto-permissions settings" page is now the "default permissions settings" page and a checkbox therein decides whether or not to apply the permissions automatically. A link to this page will only be shown when you have the "custom" role selected. With luck nobody will notice anything wrong. But at least for the next few days, please review permissions that have been assigned to new connections (either automatically or manually) and make sure they make sense (e.g. they aren't "nothing"). You still need to take action when seeing a message "permissions have changed but not yet submitted" as we always let you review and perhaps adjust the settings _before_ a connection is established (unless you have autoperms turned on).
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/follow.php b/include/follow.php
index 20fd7f5fc..b5196834d 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -64,13 +64,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$j = json_decode($ret['body'],true);
}
- if($is_red && $j) {
-
+ $my_perms = get_channel_default_perms($uid);
- // fixme - we need to be able to define these somewhere for the custom role
- $my_perms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
- |PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
- |PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
+ if($is_red && $j) {
$role = get_pconfig($uid,'system','permissions_role');
if($role) {
@@ -141,7 +137,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
}
}
- $my_perms = 0;
$their_perms = 0;
$xchan_hash = '';
@@ -168,7 +163,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
if($r) {
$xchan_hash = $r[0]['xchan_hash'];
$their_perms = 0;
- $my_perms = PERMS_W_STREAM|PERMS_W_MAIL;
$role = get_pconfig($uid,'system','permissions_role');
if($role) {
$x = get_role_perms($role);