diff options
author | friendica <info@friendica.com> | 2014-02-18 20:59:25 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-18 20:59:25 -0800 |
commit | 24d119b8c4e94ed130577e4e4a8d17ea13c406ac (patch) | |
tree | 96327bd990038c66f0e644c505522cb424a1bbd0 /include | |
parent | 6ac81c936077caa7167ddc3a2eb3c1022826d5d9 (diff) | |
download | volse-hubzilla-24d119b8c4e94ed130577e4e4a8d17ea13c406ac.tar.gz volse-hubzilla-24d119b8c4e94ed130577e4e4a8d17ea13c406ac.tar.bz2 volse-hubzilla-24d119b8c4e94ed130577e4e4a8d17ea13c406ac.zip |
introduce a new privacy level "PERMS_AUTHED" to indicate somebody that is able to successfully authenticate (but is not necessarily in this network).
Diffstat (limited to 'include')
-rw-r--r-- | include/auth.php | 2 | ||||
-rw-r--r-- | include/permissions.php | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/auth.php b/include/auth.php index 425715014..a3b028c73 100644 --- a/include/auth.php +++ b/include/auth.php @@ -93,7 +93,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p } } - $r = q("select * from hubloc left join xchan on xchan_hash = hubloc_hash where hubloc_hash = '%s' limit 1", + $r = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where xchan_hash = '%s' limit 1", dbesc($_SESSION['visitor_id']) ); if($r) { diff --git a/include/permissions.php b/include/permissions.php index 0cbb5b984..eb1a7966f 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -88,6 +88,11 @@ function get_all_perms($uid,$observer_xchan,$internal_use = true) { // These take priority over all other settings. if($observer_xchan) { + if($r[0][$channel_perm] & PERMS_AUTHED) { + $ret[$perm_name] = true; + continue; + } + if(! $abook_checked) { $x = q("select abook_my_perms, abook_flags, xchan_network from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1", @@ -240,6 +245,9 @@ function perm_is_allowed($uid,$observer_xchan,$permission) { return false; if($observer_xchan) { + if($r[0][$channel_perm] & PERMS_AUTHED) + return true; + $x = q("select abook_my_perms, abook_flags, xchan_network from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_xchan = '%s' and not ( abook_flags & %d ) limit 1", intval($uid), |