From b49cfb2efd05a46a830238e5dff703086ffc59c4 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 4 Aug 2016 10:46:50 +0200 Subject: multi acl: port /chat --- Zotlabs/Module/Chat.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Zotlabs/Module/Chat.php') diff --git a/Zotlabs/Module/Chat.php b/Zotlabs/Module/Chat.php index ff55a9319..69ab8000a 100644 --- a/Zotlabs/Module/Chat.php +++ b/Zotlabs/Module/Chat.php @@ -234,6 +234,10 @@ class Chat extends \Zotlabs\Web\Controller { '$chat_expire' => array('chat_expire',t('Expiration of chats (minutes)'),120,''), '$permissions' => t('Permissions'), '$acl' => populate_acl($channel_acl,false), + '$allow_cid' => acl2json($channel_acl['allow_cid']), + '$allow_gid' => acl2json($channel_acl['allow_gid']), + '$deny_cid' => acl2json($channel_acl['deny_cid']), + '$deny_gid' => acl2json($channel_acl['deny_gid']), '$lockstate' => $lockstate, '$submit' => t('Submit') -- cgit v1.2.3 From bed0a5773fe2300979969b46ef633f28ab84bf43 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 5 Aug 2016 13:20:03 +0200 Subject: multi acl: port /rpost --- Zotlabs/Module/Chat.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Module/Chat.php') diff --git a/Zotlabs/Module/Chat.php b/Zotlabs/Module/Chat.php index 69ab8000a..2c0e7a155 100644 --- a/Zotlabs/Module/Chat.php +++ b/Zotlabs/Module/Chat.php @@ -218,14 +218,13 @@ class Chat extends \Zotlabs\Web\Controller { notice( t('Feature disabled.') . EOL); return $o; } - - + $acl = new \Zotlabs\Access\AccessList($channel); $channel_acl = $acl->get(); - + $lockstate = (($channel_acl['allow_cid'] || $channel_acl['allow_gid'] || $channel_acl['deny_cid'] || $channel_acl['deny_gid']) ? 'lock' : 'unlock'); require_once('include/acl_selectors.php'); - + $chatroom_new = ''; if(local_channel()) { $chatroom_new = replace_macros(get_markup_template('chatroom_new.tpl'),array( @@ -243,7 +242,7 @@ class Chat extends \Zotlabs\Web\Controller { )); } - + $rooms = Zlib\Chatroom::roomlist(\App::$profile['profile_uid']); $o .= replace_macros(get_markup_template('chatrooms.tpl'), array( -- cgit v1.2.3