diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-07-30 06:30:46 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-07-30 06:30:46 -0400 |
commit | f17f51a9c1f62dc0229e2428cacea4e84313560e (patch) | |
tree | 7486b05738e943bf39619d06bec9d83d7795e746 /Zotlabs/Storage/Browser.php | |
parent | 5a63ddd6457ae4dba61ff30db5b6601b22ddd1b6 (diff) | |
parent | d858bd9265a4a0fa3589cdb2126031998310c7c3 (diff) | |
download | volse-hubzilla-f17f51a9c1f62dc0229e2428cacea4e84313560e.tar.gz volse-hubzilla-f17f51a9c1f62dc0229e2428cacea4e84313560e.tar.bz2 volse-hubzilla-f17f51a9c1f62dc0229e2428cacea4e84313560e.zip |
Merge remote-tracking branch 'upstream/dev' into website-import
Diffstat (limited to 'Zotlabs/Storage/Browser.php')
-rw-r--r-- | Zotlabs/Storage/Browser.php | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 713d75108..93c55bd4c 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -274,6 +274,22 @@ class Browser extends DAV\Browser\Plugin { // SimpleCollection, we won't need to show the panel either. if (get_class($node) === 'Sabre\\DAV\\SimpleCollection') return; + require_once('include/acl_selectors.php'); + + $aclselect = null; + $lockstate = ''; + + if($this->auth-owner_id) { + $channel = channelx_by_n($this->auth->owner_id); + if($channel) { + $acl = new \Zotlabs\Access\AccessList($channel); + $channel_acl = $acl->get(); + $lockstate = (($acl->is_private()) ? 'lock' : 'unlock'); + + $aclselect = ((local_channel() == $this->auth->owner_id) ? populate_acl($channel_acl,false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_storage')) : ''); + + } + } // Storage and quota for the account (all channels of the owner of this directory)! $limit = engr_units_to_bytes(service_class_fetch($owner, 'attach_upload_limit')); @@ -293,7 +309,6 @@ class Browser extends DAV\Browser\Plugin { userReadableSize($limit), round($used / $limit, 1) * 100); } - // prepare quota for template $quota = array(); $quota['used'] = $used; @@ -306,7 +321,12 @@ class Browser extends DAV\Browser\Plugin { '$folder_submit' => t('Create'), '$upload_header' => t('Upload file'), '$upload_submit' => t('Upload'), - '$quota' => $quota + '$quota' => $quota, + '$channick' => $this->auth->owner_nick, + '$aclselect' => $aclselect, + '$lockstate' => $lockstate, + '$return_url' => \App::$cmd, + '$dragdroptext' => t('Drop files here to immediately upload') )); } |