From 401409357238183702c1628a02ccef6cf0394d72 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 17 Sep 2014 17:59:46 -0700 Subject: implement permission roles - the backend should be done except for maybe a couple of small tweaks. Now we just need to define the rest of the roles and create a chooser for them. Adam started on this some time back but I don't know where that has gone. --- include/follow.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/follow.php') diff --git a/include/follow.php b/include/follow.php index 18a9e66ea..3c1fcd890 100644 --- a/include/follow.php +++ b/include/follow.php @@ -63,6 +63,13 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $my_perms = PERMS_W_STREAM|PERMS_W_MAIL; + $role = get_pconfig($uid,'system','permissions_role'); + if($role) { + $x = get_role_perms($role); + if($x['perms_follow']) + $my_perms = $x['perms_follow']; + } + logger('follow: ' . $url . ' ' . print_r($j,true), LOGGER_DEBUG); @@ -153,6 +160,12 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $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); + if($x['perms_follow']) + $my_perms = $x['perms_follow']; + } } } -- cgit v1.2.3