diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Channel.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Chat.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Editwebpage.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Events.php | 12 | ||||
-rw-r--r-- | Zotlabs/Module/Filestorage.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Mitem.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Photos.php | 10 | ||||
-rw-r--r-- | Zotlabs/Module/Webpages.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Wiki.php | 17 | ||||
-rw-r--r-- | Zotlabs/Storage/Browser.php | 4 |
11 files changed, 61 insertions, 10 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/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') diff --git a/Zotlabs/Module/Editwebpage.php b/Zotlabs/Module/Editwebpage.php index a55f81101..2da8871a2 100644 --- a/Zotlabs/Module/Editwebpage.php +++ b/Zotlabs/Module/Editwebpage.php @@ -151,6 +151,7 @@ class Editwebpage extends \Zotlabs\Web\Controller { 'post_id' => $post_id, 'visitor' => ($is_owner) ? true : false, 'acl' => populate_acl($itm[0],false,\Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_pages')), + 'permissions' => $itm[0], 'showacl' => ($is_owner) ? true : false, 'mimetype' => $mimetype, 'mimeselect' => true, diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index def5c437b..d27de9989 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -435,6 +435,10 @@ class Events extends \Zotlabs\Web\Controller { $acl = new \Zotlabs\Access\AccessList($channel); $perm_defaults = $acl->get(); + + $permissions = ((x($orig_event)) ? $orig_event : $perm_defaults); + + //print_r(acl2json($permissions['allow_gid'])); killme(); $tpl = get_markup_template('event_form.tpl'); @@ -467,10 +471,16 @@ class Events extends \Zotlabs\Web\Controller { '$sh_checked' => $sh_checked, '$share' => array('share', t('Share this event'), $sh_checked, '', array(t('No'),t('Yes'))), '$preview' => t('Preview'), - '$permissions' => t('Permission settings'), + '$perms_label' => t('Permission settings'), // populating the acl dialog was a permission description from view_stream because Cal.php, which // displays events, says "since we don't currently have an event permission - use the stream permission" '$acl' => (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults), false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'))), + + '$allow_cid' => acl2json($permissions['allow_cid']), + '$allow_gid' => acl2json($permissions['allow_gid']), + '$deny_cid' => acl2json($permissions['deny_cid']), + '$deny_gid' => acl2json($permissions['deny_gid']), + '$submit' => t('Submit'), '$advanced' => t('Advanced Options') diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php index c3ef22e32..a401f4822 100644 --- a/Zotlabs/Module/Filestorage.php +++ b/Zotlabs/Module/Filestorage.php @@ -141,7 +141,7 @@ class Filestorage extends \Zotlabs\Web\Controller { // Encode path that is used for link so it's a valid URL // Keep slashes as slashes, otherwise mod_rewrite doesn't work correctly $encoded_path = str_replace('%2F', '/', rawurlencode($cloudpath)); - + $o = replace_macros(get_markup_template('attach_edit.tpl'), array( '$header' => t('Edit file permissions'), '$file' => $f, @@ -151,6 +151,10 @@ class Filestorage extends \Zotlabs\Web\Controller { '$channelnick' => $channel['channel_address'], '$permissions' => t('Permissions'), '$aclselect' => $aclselect_e, + '$allow_cid' => acl2json($f['allow_cid']), + '$allow_gid' => acl2json($f['allow_gid']), + '$deny_cid' => acl2json($f['deny_cid']), + '$deny_gid' => acl2json($f['deny_gid']), '$lockstate' => $lockstate, '$permset' => t('Set/edit permissions'), '$recurse' => array('recurse', t('Include all files and sub folders'), 0, '', array(t('No'), t('Yes'))), @@ -161,7 +165,7 @@ 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'))), )); echo $o; diff --git a/Zotlabs/Module/Mitem.php b/Zotlabs/Module/Mitem.php index b64b50c8e..28f51b81b 100644 --- a/Zotlabs/Module/Mitem.php +++ b/Zotlabs/Module/Mitem.php @@ -147,12 +147,16 @@ class Mitem extends \Zotlabs\Web\Controller { else { $display = (($r) ? 'none' : 'block'); } - + $create = replace_macros(get_markup_template('mitemedit.tpl'), array( '$menu_id' => \App::$data['menu']['menu_id'], '$permissions' => t('Menu Item Permissions'), '$permdesc' => t("\x28click to open/close\x29"), '$aclselect' => populate_acl($acl->get(),false), + '$allow_cid' => acl2json($acl->get()['allow_cid']), + '$allow_gid' => acl2json($acl->get()['allow_gid']), + '$deny_cid' => acl2json($acl->get()['deny_cid']), + '$deny_gid' => acl2json($acl->get()['deny_gid']), '$mitem_desc' => array('mitem_desc', t('Link Name'), '', 'Visible name of the link','*'), '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), '', t('Enter URL of the link or select a menu name to create a submenu'), '*', 'list="menu-names"'), '$usezid' => array('usezid', t('Use magic-auth if available'), true, '', array(t('No'), t('Yes'))), @@ -226,6 +230,10 @@ class Mitem extends \Zotlabs\Web\Controller { '$permissions' => t('Menu Item Permissions'), '$permdesc' => t("\x28click to open/close\x29"), '$aclselect' => populate_acl($mitem,false), + '$allow_cid' => acl2json($mitem['allow_cid']), + '$allow_gid' => acl2json($mitem['allow_gid']), + '$deny_cid' => acl2json($mitem['deny_cid']), + '$deny_gid' => acl2json($mitem['deny_gid']), '$mitem_id' => intval(argv(2)), '$mitem_desc' => array('mitem_desc', t('Link text'), $mitem['mitem_desc'], '','*'), '$mitem_link' => array('mitem_link', t('Link or Submenu Target'), $mitem['mitem_link'], 'Enter URL of the link or select a menu name to create a submenu', '*', 'list="menu-names"'), 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(), diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index 1eeab1461..6aeac7af7 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -668,6 +668,10 @@ class Photos extends \Zotlabs\Web\Controller { '$selname' => $selname, '$permissions' => t('Permissions'), '$aclselect' => $aclselect, + '$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, '$uploader' => $ret['addon_text'], '$default' => (($ret['default_upload']) ? true : false), @@ -1016,7 +1020,7 @@ class Photos extends \Zotlabs\Web\Controller { // FIXME - remove this when we move to conversation module $r = $r[0]['children']; - + $edit = null; if($can_post) { $album_e = $ph[0]['album']; @@ -1042,6 +1046,10 @@ class Photos extends \Zotlabs\Web\Controller { 'tag_label' => t('Add a Tag'), 'permissions' => t('Permissions'), 'aclselect' => $aclselect_e, + 'allow_cid' => acl2json($ph[0]['allow_cid']), + 'allow_gid' => acl2json($ph[0]['allow_gid']), + 'deny_cid' => acl2json($ph[0]['deny_cid']), + 'deny_gid' => acl2json($ph[0]['deny_gid']), 'lockstate' => $lockstate[0], 'help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com'), 'item_id' => ((count($linked_items)) ? $link_item['id'] : 0), diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php index d3199f223..0a48d43c6 100644 --- a/Zotlabs/Module/Webpages.php +++ b/Zotlabs/Module/Webpages.php @@ -127,6 +127,7 @@ class Webpages extends \Zotlabs\Web\Controller { 'nickname' => \App::$profile['channel_address'], 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), 'acl' => (($is_owner) ? populate_acl($channel_acl,false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_pages')) : ''), + 'permissions' => (($is_owner) ? $channel_acl : ''), 'showacl' => (($is_owner) ? true : false), 'visitor' => true, 'hide_location' => true, diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 24a0b6e1c..bb4e9179c 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -74,11 +74,16 @@ class Wiki extends \Zotlabs\Web\Controller { // Initialize the ACL to the channel default permissions $x = array( 'lockstate' => (( $local_observer['channel_allow_cid'] || - $local_observer['channel_allow_gid'] || - $local_observer['channel_deny_cid'] || - $local_observer['channel_deny_gid']) - ? 'lock' : 'unlock'), + $local_observer['channel_allow_gid'] || + $local_observer['channel_deny_cid'] || + $local_observer['channel_deny_gid']) + ? 'lock' : 'unlock' + ), 'acl' => populate_acl($channel_acl), + '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']), 'bang' => '' ); } else { @@ -186,6 +191,10 @@ class Wiki extends \Zotlabs\Web\Controller { '$page' => $pageUrlName, '$lockstate' => $x['lockstate'], '$acl' => $x['acl'], + '$allow_cid' => $x['allow_cid'], + '$allow_gid' => $x['allow_gid'], + '$deny_cid' => $x['deny_cid'], + '$deny_gid' => $x['deny_gid'], '$bang' => $x['bang'], '$content' => $content, '$renderedContent' => $renderedContent, diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 93c55bd4c..78b267bf8 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -324,6 +324,10 @@ class Browser extends DAV\Browser\Plugin { '$quota' => $quota, '$channick' => $this->auth->owner_nick, '$aclselect' => $aclselect, + '$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, '$return_url' => \App::$cmd, '$dragdroptext' => t('Drop files here to immediately upload') |