0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/data
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
..
db 🎨 ⏱ Cleanup / optimise the server.init() function (#7985) 2017-02-17 17:44:34 +01:00
export 🐛 export database read settings from database (#8103) 2017-03-08 10:26:57 +00:00
import Import from LTS blogs now properly adds tags to posts. (#7926) 2017-01-31 17:50:44 +01:00
importer 🔥 remove imageRelPath (#7927) 2017-02-03 14:42:05 +00:00
meta 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
migrations 🔥 🎨 No more updateSettingsCache (#8090) 2017-03-02 23:00:01 +01:00
schema Themes API activation permissions & validation (#8104) 2017-03-13 12:44:44 +01:00
slack 🎨 add urlFor('admin') and increase usage of urlFor helper (#7935) 2017-02-02 18:51:35 +00:00
validation 🔥 🎨 Themes & settings misc cleanup (#8061) 2017-02-27 23:30:49 +01:00
xml 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
timezones.json Adds UTC as select option to timezones select list 2016-06-10 15:19:16 +02:00