Ghost/core/server
Katharina Irrgang 40d0a745df Multiple authors (#9426)
no issue

This PR adds the server side logic for multiple authors. This adds the ability to add multiple authors per post. We keep and support single authors (maybe till the next major - this is still in discussion)

### key notes

- `authors` are not fetched by default, only if we need them
- the migration script iterates over all posts and figures out if an author_id is valid and exists (in master we can add invalid author_id's) and then adds the relation (falls back to owner if invalid)
- ~~i had to push a fork of bookshelf to npm because we currently can't bump bookshelf + the two bugs i discovered are anyway not yet merged (https://github.com/kirrg001/bookshelf/commits/master)~~ replaced by new bookshelf release
- the implementation of single & multiple authors lives in a single place (introduction of a new concept: model relation)
- if you destroy an author, we keep the behaviour for now -> remove all posts where the primary author id matches. furthermore, remove all relations in posts_authors (e.g. secondary author)
- we make re-use of the `excludeAttrs` concept which was invented in the contributors PR (to protect editing authors as author/contributor role) -> i've added a clear todo that we need a logic to make a diff of the target relation -> both for tags and authors
- `authors` helper available (same as `tags` helper)
- `primary_author` computed field available
- `primary_author` functionality available (same as `primary_tag` e.g. permalinks, prev/next helper etc)
2018-03-27 15:16:15 +01:00
..
adapters Moved utils constants to lib/constants 2017-12-14 14:13:40 +01:00
api Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
apps Redirected /amp links to original post when AMP is disabled (#9496) 2018-03-19 16:11:48 +07:00
config Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
controllers Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
data Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
helpers Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
lib Fix Node.js 4.x compatibility (#9503) 2018-03-15 09:50:25 +00:00
models Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
public 🛠 🙈 Rename ghost-url.js to ghost-sdk.js (#8767) 2017-07-28 18:23:32 +04:00
services Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
translations Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
views Fixed error trying to render 404 for missing asset 2017-12-22 20:08:59 +00:00
web 🐛Fixed asset redirects (#9455) 2018-02-14 17:21:31 +01:00
analytics-events.js Cleared out old unused events 2017-12-13 09:08:25 +00:00
filters.js Moved pipeline/sequence to lib/promise 2017-12-13 22:20:02 +01:00
ghost-server.js Always require fs-extra - consistency change 2017-12-13 20:57:11 +01:00
index.js Theme translations and blog localisation (#8437) 2018-01-09 14:50:57 +01:00
overrides.js Set Promise to be Bluebird globally 2017-12-13 20:57:11 +01:00
update-check.js Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00