0
Fork 0
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:
kirrg001 2016-09-13 18:20:44 +02:00 committed by Hannah Wolfe
parent 1f85604d09
commit b3bafa4ba8

View file

@ -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) {