aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2016-08-01 14:07:18 +0200
committerzottel <github@zottel.net>2016-08-01 14:07:18 +0200
commit55eda16b61041cf5d3aa941f3b2b4329246b1028 (patch)
tree175b6395415767523f1046ee42d654efaf1dac8a /include/permissions.php
parentb5ea20ac863ebdbc4cc0bad6b7ca9876df336e8f (diff)
parent3d0c90cbc5b756c6d54c4d41a136c0a38e67b013 (diff)
downloadvolse-hubzilla-55eda16b61041cf5d3aa941f3b2b4329246b1028.tar.gz
volse-hubzilla-55eda16b61041cf5d3aa941f3b2b4329246b1028.tar.bz2
volse-hubzilla-55eda16b61041cf5d3aa941f3b2b4329246b1028.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 638bedb24..a1e05d120 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -1,4 +1,7 @@
<?php
+
+require_once('include/security.php');
+
/**
* @file include/permissions.php
*
@@ -123,6 +126,9 @@ function get_all_perms($uid, $observer_xchan, $internal_use = true) {
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
dbesc($observer_xchan)
);
+ // no xchan either, see if they've got a guest access token
+ if(! $y)
+ $x = atoken_abook($uid,$observer_xchan);
}
$abook_checked = true;
@@ -332,6 +338,9 @@ function perm_is_allowed($uid, $observer_xchan, $permission) {
$y = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
dbesc($observer_xchan)
);
+ // no xchan either, see if they've got a guest access token
+ if(! $y)
+ $x = atoken_abook($uid,$observer_xchan);
}
$abperms = load_abconfig($uid,$observer_xchan,'my_perms');
}