mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
🎨 🔦 restrict themes storage to local-file-store
refs #6982 - this was handled before by the old ConfigManager - this logic belongs into the storage logic itself - for now we only allow uploading themes via the local-file-store [ci skip]
This commit is contained in:
parent
1f85604d09
commit
b3bafa4ba8
1 changed files with 9 additions and 1 deletions
|
@ -11,7 +11,15 @@ function getStorage(type) {
|
|||
type = type || 'images';
|
||||
|
||||
var storageChoice = config.get('storage').active[type],
|
||||
storageConfig = config.get('storage')[storageChoice];
|
||||
storageConfig;
|
||||
|
||||
// CASE: we only allow local-file-storage for themes
|
||||
// @TODO: https://github.com/TryGhost/Ghost/issues/7246
|
||||
if (type === 'themes') {
|
||||
storageChoice = 'local-file-store';
|
||||
}
|
||||
|
||||
storageConfig = config.get('storage')[storageChoice];
|
||||
|
||||
// CASE: type does not exist
|
||||
if (!storageChoice) {
|
||||
|
|
Loading…
Add table
Reference in a new issue