diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-08-03 21:16:57 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-08-03 21:16:57 +0200 |
commit | c50bfa07ca3a456d69d73988f42e58e3282879e9 (patch) | |
tree | 62f67ca42fa8cd19df88afa337837dc52db8986c /Zotlabs | |
parent | d858bd9265a4a0fa3589cdb2126031998310c7c3 (diff) | |
download | volse-hubzilla-c50bfa07ca3a456d69d73988f42e58e3282879e9.tar.gz volse-hubzilla-c50bfa07ca3a456d69d73988f42e58e3282879e9.tar.bz2 volse-hubzilla-c50bfa07ca3a456d69d73988f42e58e3282879e9.zip |
multiple acl work
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Channel.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Filestorage.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index c74802ec5..59cb9f06c 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -133,6 +133,7 @@ class Channel extends \Zotlabs\Web\Controller { 'nickname' => \App::$profile['channel_address'], 'lockstate' => (((strlen(\App::$profile['channel_allow_cid'])) || (strlen(\App::$profile['channel_allow_gid'])) || (strlen(\App::$profile['channel_deny_cid'])) || (strlen(\App::$profile['channel_deny_gid']))) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post') : ''), + 'permissions' => (($is_owner) ? $channel_acl : ''), 'showacl' => (($is_owner) ? 'yes' : ''), 'bang' => '', 'visitor' => (($is_owner || $observer) ? true : false), @@ -363,4 +364,4 @@ class Channel extends \Zotlabs\Web\Controller { return $o; } -}
\ No newline at end of file +} diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php index c3ef22e32..c8ad147bb 100644 --- a/Zotlabs/Module/Filestorage.php +++ b/Zotlabs/Module/Filestorage.php @@ -161,7 +161,12 @@ class Filestorage extends \Zotlabs\Web\Controller { '$submit' => t('Submit'), '$attach_btn_title' => t('Share this file'), '$link_btn_title' => t('Show URL to this file'), - '$notify' => array('notify', t('Notify your contacts about this file'), 0, '', array(t('No'), t('Yes'))) + '$notify' => array('notify', t('Notify your contacts about this file'), 0, '', array(t('No'), t('Yes'))), + + '$allow_cid' => json_encode(expand_acl($f['allow_cid'])), + '$allow_gid' => json_encode(expand_acl($f['allow_gid'])), + '$deny_cid' => json_encode(expand_acl($f['deny_cid'])), + '$deny_cid' => json_encode(expand_acl($f['deny_gid'])) )); echo $o; diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 3b88cd8d6..0128adc2c 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -170,6 +170,7 @@ class Network extends \Zotlabs\Web\Controller { 'nickname' => $channel['channel_address'], 'lockstate' => (($private_editing || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), 'acl' => populate_acl((($private_editing) ? $def_acl : $channel_acl), true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'), + 'permissions' => (($private_editing) ? $def_acl : $channel_acl), 'bang' => (($private_editing) ? '!' : ''), 'visitor' => true, 'profile_uid' => local_channel(), |