diff options
author | redmatrix <git@macgirvin.com> | 2016-08-01 20:12:52 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-08-01 20:12:52 -0700 |
commit | 3a7d3e3a542ef9297a8a20e3548f01f43fb37f0e (patch) | |
tree | 6407606ded7a75412ed888a80693f3774e63c875 /Zotlabs/Module/Settings.php | |
parent | 4c76b31684342259a43c036373f3757a916b1d3a (diff) | |
download | volse-hubzilla-3a7d3e3a542ef9297a8a20e3548f01f43fb37f0e.tar.gz volse-hubzilla-3a7d3e3a542ef9297a8a20e3548f01f43fb37f0e.tar.bz2 volse-hubzilla-3a7d3e3a542ef9297a8a20e3548f01f43fb37f0e.zip |
This checkin should make all permission modes work correctly with atokens (they should be able to post content if allowed to). It also removes the strict linkage between permissions and connections so any individual permission can be set for any xchan; even those for which you have no connections.
Diffstat (limited to 'Zotlabs/Module/Settings.php')
-rw-r--r-- | Zotlabs/Module/Settings.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index 48ab6b8bf..ecf6d03d6 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -2,7 +2,7 @@ namespace Zotlabs\Module; /** @file */ require_once('include/zot.php'); - +require_once('include/security.php'); class Settings extends \Zotlabs\Web\Controller { @@ -781,6 +781,8 @@ class Settings extends \Zotlabs\Web\Controller { if((argc() > 1) && (argv(1) === 'tokens')) { $atoken = null; + $atoken_xchan = ''; + if(argc() > 2) { $id = argv(2); @@ -793,12 +795,14 @@ class Settings extends \Zotlabs\Web\Controller { $atoken = $atoken[0]; $atoken_xchan = substr($channel['channel_hash'],0,16) . '.' . $atoken['atoken_name']; } + if($atoken && argc() > 3 && argv(3) === 'drop') { - $r = q("delete from atoken where atoken_id = %d", - intval($id) - ); + atoken_delete($id); + $atoken = null; + $atoken_xchan = ''; } } + $t = q("select * from atoken where atoken_uid = %d", intval(local_channel()) ); |