Ghost/core/server
Katharina Irrgang dfd4afea19 Add bookshelf-relations (#9252)
no issue

- added https://github.com/TryGhost/bookshelf-relations as dependency
- remove existing tag handling

--- 

* Important: Ensure we trigger parent initialize function

- otherwise the plugin is unable to listen on model events
- important: event order for listeners is Ghost -> Plugin
- Ghost should be able to listen on the events as first instance
- e.g. be able to modify/validate relationships

* Fix tag validation

- we detect lower/update case slugs for tags manually
- this can't be taken over from the plugin obviously
- ensure we update the target model e.g. this.set('tags', ...)

* override base fn: `permittedAttributes`

- ensure we call the base
- put relations on top
- each relation is allowed to be passed
- the plugin will auto-unset any relations to it does not reach the database

* Ensure we run add/edit/delete within a transaction

- updating nested relationships requires sql queries
- all sql statements have to run in a single transaction to ensure we rollback everything if an error occurs
- use es6
2017-11-21 13:28:05 +00:00
..
adapters Moved isLocalFile fn to storage utils (#8985) 2017-11-09 11:11:54 +01:00
admin Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
api Added GET/DELETE /subscribers/email/:email/ endpoints (#9238) 2017-11-14 12:09:41 +01:00
apps Introduced renderer to DRY up controllers (#9235) 2017-11-10 12:44:29 +00:00
auth 🐛 Fixed concurrent renew of access tokens 2017-11-14 10:22:09 +00:00
config 🐛 Fixed redirects upload for various browsers/systems (#9042) 2017-09-22 21:57:43 +02:00
controllers Introduced renderer to DRY up controllers (#9235) 2017-11-10 12:44:29 +00:00
data Set soft limits for blog title and description (#9250) 2017-11-16 13:58:22 +01:00
events post-scheduling 2016-06-14 10:52:13 +02:00
helpers Feature: {{reading_time}} theme helper (#9217) 2017-11-06 18:40:07 +00:00
mail Improved log output for welcome email error (#9016) 2017-09-19 14:24:20 +01:00
middleware Introduced renderer to DRY up controllers (#9235) 2017-11-10 12:44:29 +00:00
models Add bookshelf-relations (#9252) 2017-11-21 13:28:05 +00:00
permissions Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
public 🛠 🙈 Rename ghost-url.js to ghost-sdk.js (#8767) 2017-07-28 18:23:32 +04:00
services Added Url Service to track all URLs in the system (#9247) 2017-11-16 13:03:24 +00:00
settings 🐛 Theme name is point number (#9184) 2017-10-26 13:54:18 +02:00
site Rework route service to prevent circular dependencies (#9229) 2017-11-09 13:58:22 +00:00
themes Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
translations Added more database soft limits (#9225) 2017-11-09 15:22:20 +01:00
utils Moved isLocalFile fn to storage utils (#8985) 2017-11-09 11:11:54 +01:00
views 🎨 gscan 1.1.0 & optimisations 2017-06-06 13:07:50 +07:00
analytics-events.js Add segment analytics for blog data (#8912) 2017-08-22 12:23:23 +01:00
app.js Rename blog -> site 2017-10-26 18:09:56 +01:00
errors.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
filters.js Misc grunt /dev updates 2015-05-28 20:25:14 +01:00
ghost-server.js Used ghost-ignition.debug, removed debug dep (#8881) 2017-08-15 18:29:27 +07:00
i18n.js Do not log error if i18n.doesTranslationKeyExist is called 2017-11-14 14:03:48 +01:00
index.js Added Url Service to track all URLs in the system (#9247) 2017-11-16 13:03:24 +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 Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00