From c3691513978c4ac933ba29035128708ec61b666e Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 21 Jan 2018 14:24:59 -0600 Subject: [PATCH] Allow editing symlinked files --- CHANGELOG.md | 3 +++ app/Http/Requests/Server/UpdateFileContentsFormRequest.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c17ac992..894ed60f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * `[beta.4]` — Fixes behavior of variable validation to not break the page when no rules are provided. * `[beta.4]` — Fix bug preventing the editing of files in the file manager. +### Added +* Added support for editing symlinked files on the Panel. + ## v0.7.0-beta.4 (Derelict Dermodactylus) ### Fixed * `[beta.3]` — Fixes a bug with the default environment file that was causing an inability to perform a fresh install when running package discovery. diff --git a/app/Http/Requests/Server/UpdateFileContentsFormRequest.php b/app/Http/Requests/Server/UpdateFileContentsFormRequest.php index da316cc22..0ebaa25b6 100644 --- a/app/Http/Requests/Server/UpdateFileContentsFormRequest.php +++ b/app/Http/Requests/Server/UpdateFileContentsFormRequest.php @@ -86,7 +86,7 @@ class UpdateFileContentsFormRequest extends ServerFormRequest } } - if (! $stats->file || ! in_array($stats->mime, $config->get('pterodactyl.files.editable'))) { + if ((! $stats->file && ! $stats->symlink) || ! in_array($stats->mime, $config->get('pterodactyl.files.editable'))) { throw new FileTypeNotEditableException(trans('server.files.exceptions.invalid_mime')); }