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/File.php') 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