From aac0fa2b5fb4f81a567a782bb6bafce7e46fe19e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 16 Jul 2016 01:02:41 -0700 Subject: os_delete_prohibit --- Zotlabs/Storage/File.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index ecd15cc55..5a70a99f1 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -337,6 +337,10 @@ class File extends DAV\Node implements DAV\IFile { } } + if(get_pconfig($this->auth->owner_id,'system','os_delete_prohibit') && \App::$module == 'dav') { + throw new DAV\Exception\Forbidden('Permission denied.'); + } + attach_delete($this->auth->owner_id, $this->data['hash']); $ch = channelx_by_n($this->auth->owner_id); -- cgit v1.2.3 From dc9fa7cf64ee41e0c9457737079aee16093a4b9c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 17 Jul 2016 16:04:00 -0700 Subject: include attach.php at the module level since 2d4b75428a87038 wasn't backported to dev and we're about to branch an RC --- Zotlabs/Storage/Directory.php | 1 - 1 file changed, 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index b524b3cab..6242d5274 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -206,7 +206,6 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { throw new DAV\Exception\Forbidden('Permission denied.'); } - require_once('include/attach.php'); $mimetype = z_mime_content_type($name); -- cgit v1.2.3 From 9421e42dad0bee6e0aa292d390cf249e1d7f7df4 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 19 Jul 2016 17:04:38 -0700 Subject: doc correction --- Zotlabs/Storage/BasicAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/BasicAuth.php b/Zotlabs/Storage/BasicAuth.php index 60fc2c988..9c73b47b9 100644 --- a/Zotlabs/Storage/BasicAuth.php +++ b/Zotlabs/Storage/BasicAuth.php @@ -231,7 +231,7 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic { } /** - * @brief Sets the timezone from the channel in RedBasicAuth. + * @brief Sets the timezone from the channel in BasicAuth. * * Set in mod/cloud.php if the channel has a timezone set. * -- cgit v1.2.3