aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-17 17:59:46 -0700
committerfriendica <info@friendica.com>2014-09-17 17:59:46 -0700
commit401409357238183702c1628a02ccef6cf0394d72 (patch)
tree3e44b80aaca8fb79c7571aba7bb66f31386eb4ca /include/follow.php
parentcd790447782c0a7deba56209afc2e6352e004743 (diff)
downloadvolse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.tar.gz
volse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.tar.bz2
volse-hubzilla-401409357238183702c1628a02ccef6cf0394d72.zip
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.
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php13
1 files changed, 13 insertions, 0 deletions
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'];
+ }
}
}