Skip to content

Commit

Permalink
🎨 🔦 restrict themes storage to local-file-store
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
kirrg001 authored and ErisDS committed Sep 20, 2016
1 parent 1f85604 commit b3bafa4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/server/storage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b3bafa4

Please sign in to comment.