Ghost/core/server
Hannah Wolfe b2f1d0559b Themes API activation permissions & validation (#8104)
refs #8093

 Add activate theme permission
- add permission to activate themes
- update tests
- also: update tests for invites
TODO: change how the active theme setting is updated to reduce extra permissions

 Move theme validation to gscan
- add a new gscan validation method and use it for upload
- update activate endpoint to do validation also using gscan
- change to using SettingsModel instead of API so that we don't call validation or permissions on the settings API
- remove validation from the settings model
- remove the old validation function
- add new invalid theme message to translations & remove a bunch of theme validation related unused keys

📖  Planned changes

🚨 Tests for theme activation API endpoint
🐛 Don't allow deleting the active theme

🚫 Prevent activeTheme being set via settings API
- We want to control how this happens in future.
- We still want to store the information in settings, via the model.
- We just don't want to be able to change this info via the settings edit endpoint

🐛  Fix warnings for uploads & add for activations
- warnings for uploads were broken in f8b498d
- fix the response + adds tests to cover that warnings are correctly returned
- add the same response to activations + more tests
- activations now return a single theme object - the theme that was activated + any warnings

🎨 Improve how we generate theme API responses
- remove the requirement to pass in the active theme!
- move this to a specialist function, away from the list

🎨 Do not load gscan on boot
2017-03-13 12:44:44 +01:00
..
admin 🎨 fix admin and theme caching issues (#8058) 2017-03-02 18:18:21 +01:00
api Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
apps 🐛 subscriber: sanitize email (#8078) 2017-03-03 15:44:07 +01:00
auth 🎨 handle case: sync email after logout (#8097) 2017-03-08 14:31:22 +00:00
blog 🎨 rename redirects middleware to custom-redirects 2017-02-07 20:05:50 +01:00
config 🎨 fix admin and theme caching issues (#8058) 2017-03-02 18:18:21 +01:00
controllers/frontend 🔥 No more availableThemes (#8085) 2017-03-02 17:53:48 +01:00
data Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
events post-scheduling 2016-06-14 10:52:13 +02:00
helpers 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
mail 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
middleware 🐛 Use isIgnitionError to detect unhandled errors (#8100) 2017-03-06 17:37:16 +01:00
models Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
permissions 🐛 fix invite permissions for editor (#7889) 2017-01-25 12:07:31 +00:00
scheduling Shows help message for broken require in scheduler adapter (#7706) 2017-01-16 21:49:41 +01:00
settings 🔥 🎨 No more updateSettingsCache (#8090) 2017-03-02 23:00:01 +01:00
storage 🔥 remove imageRelPath (#7927) 2017-02-03 14:42:05 +00:00
themes Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
translations Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
utils fix uid method in core/server/utils/index.js to return a string which length is equal to len argument (#8025) 2017-03-03 15:35:08 +01:00
views Switch to new native system font stack (#7219) 2016-08-18 20:29:46 +01:00
app.js 🎨 logging improvements (#7597) 2016-10-25 12:17:43 +01:00
errors.js 🛠 use Ignition for logging/errors (#7869) 2017-01-23 11:04:01 +00:00
filters.js Misc grunt /dev updates 2015-05-28 20:25:14 +01:00
ghost-server.js Theme loading part 1 (#7989) 2017-02-22 00:26:19 +01:00
i18n.js improvement: general fixes 2016-06-01 07:07:20 +02:00
index.js 🎨 deny auto switch (#8086) 2017-03-02 19:50:58 +00:00
logging.js 🐛 forward missing logging config: rotation 2017-02-17 18:24:14 +01:00
overrides.js 🛠 update lodash,knex and bookshelf to latest versions 2016-09-26 10:20:55 +02:00
update-check.js 🎨 send LTS parameter if requesting the update check service (#7954) 2017-02-07 19:51:19 +01:00