diff options
author | Mario <mario@mariovavti.com> | 2021-12-18 19:09:15 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-12-18 19:09:15 +0000 |
commit | 5aefe0b74f00b199a1f690c1787d26e833d3a2d5 (patch) | |
tree | 11f0ffaeb43bae7e73e2947381198f2b2262ad21 /include/permissions.php | |
parent | 9c79b5be77da7e5626ca7f0671fe5ed9b1f9c955 (diff) | |
download | volse-hubzilla-5aefe0b74f00b199a1f690c1787d26e833d3a2d5.tar.gz volse-hubzilla-5aefe0b74f00b199a1f690c1787d26e833d3a2d5.tar.bz2 volse-hubzilla-5aefe0b74f00b199a1f690c1787d26e833d3a2d5.zip |
guest token xchan_network = "token" and remove permission checks since the guest tokens are now added to the abook automatically
Diffstat (limited to 'include/permissions.php')
-rw-r--r-- | include/permissions.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/include/permissions.php b/include/permissions.php index bbd13ed58..c3a9286c0 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -80,23 +80,6 @@ function get_all_perms($uid, $observer_xchan, $check_siteblock = true, $default_ intval($uid), dbesc($observer_xchan) ); - if(! $x) { - // see if they've got a guest access token; these are treated as connections - $y = atoken_abook($uid,$observer_xchan); - if($y) - $x = array($y); - - if(! $x) { - // not in address book and no guest token, see if they've got an xchan - // these *may* have individual (PERMS_SPECIFIC) permissions, but are not connections - $y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1", - dbesc($observer_xchan) - ); - if($y) { - $x = array(pseudo_abook($y[0])); - } - } - } $abook_checked = true; } @@ -309,32 +292,6 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock = if(($x) && in_array($permission,$blocked_anon_perms) && intval($x[0]['abook_ignored'])) return false; - if(! $x) { - // see if they've got a guest access token - $y = atoken_abook($uid,$observer_xchan); - if($y) - $x = array($y); - - if(! $x) { - // not in address book and no guest token, see if they've got an xchan - - $y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1", - dbesc($observer_xchan) - ); - if($y) { - - // This requires an explanation and the effects are subtle. - // The following line creates a fake connection, and this allows - // access tokens to have specific permissions even though they are - // not actual connections. - // The existence of this fake entry must be checked when dealing - // with connection related permissions. - - $x = array(pseudo_abook($y[0])); - } - } - - } $abperms = load_abconfig($uid,$observer_xchan,'my_perms'); } |