Commit Graph

7171 Commits

Author SHA1 Message Date
Katharina Irrgang
319a388277 ghost auth: sync email (#8027)
*   ghost auth: sync email

refs #7452

- sync email changes in background (every hour right now)
- sync logged in user only!
- no sync if auth strategy password is used
- GET /users/me is triggered on every page refresh
- added TODO to support or add long polling for syncing data later
- no tests yet on purpose, as i would like to get a basic review first

* 🐩  use events

- remember sync per user
2017-02-23 18:04:24 +00:00
Hannah Wolfe
ffcf7d1d83 Update install instructions to include global deps
- knex-migrator and gulp are required
2017-02-22 12:45:28 +00:00
David Balderston
a64b8f0449 Update Install Instructions (#8034)
No Issue

* You may have had a reason for it to be the way it was, but this
updates it to be the actual commands rather than just close to actual
commands
2017-02-22 07:21:54 +00:00
Hannah Wolfe
fe90cf2be2 Theme loading part 1 (#7989)
no issue

*  Add new server start & stop events
* 🔥 Get rid of unused availableApps concept
- when we need an API endpoint for a list of apps, we'll build one 😝
*  Move theme loading into a module
- move loading from API method to a module method and use as needed
- wire up read one vs read all as per LTS
- read one (the active theme) on boot, and read the rest after
- fudge validation - this isn't all that helpful
* Settings API tests need to preload themes
- this used to automatically happen as part of loading settings
- now we need to trigger this to happen specifically for this test
2017-02-22 00:26:19 +01:00
Hannah Wolfe
294561cac7 Theme Browse API endpoint (#8022)
no issue
- adds `GET /themes/` endpoint for requesting all themes
2017-02-21 14:59:03 +00:00
Hannah Wolfe
348e4c2a95 Miscellaneous code cleanup (#8031)
no issue

- 🔥 Remove duplicated file
- 💄 🐷  Cleanup double slashes
- 💄 🐷 Remove duplicate require
2017-02-21 10:39:09 +01:00
kirrg001
a11cd132c8 Version bump to 1.0.0-alpha.13 2017-02-18 17:24:12 +01:00
kirrg001
27ea11b145 Updated Ghost-Admin to 1.0.0-alpha.13 2017-02-18 17:24:12 +01:00
Katharina Irrgang
aa670fa8b4 Updates for alpha.13 (#8026)
* 🐛  delete client if auth url has changed

no issue

* 🎨  update default auth config

refs #7488
2017-02-18 17:23:35 +01:00
kirrg001
6880199767 Update ghost-ignition to version 2.8.7 🚀 2017-02-18 16:17:57 +01:00
Katharina Irrgang
2e1d7fcc42 🚨 database: change hard limits and field types (#7932)
refs #7432

🚨  database: change hard limits and field types

- we went over all schema fields and decided to decrease/increase the hard limits
- the core goal is to have more flexibility in the future
- we reconsidered string vs. text

There are 5 groups:

- small strings: 50 characters
    - static strings
    - status, visibility, language, role name, permission name, client name etc.
- medium strings: 191 characters
    - all unique fields or fields which can be unique in the future
    - slug, tokens, user name, password, tag name, email
- large strings: 1000-2000 characters
    - these fields need to be very flexible
    - these fields get a soft limit attached (in a different PR)
    - post title, meta title, meta description, urls
- medium text: 64kb characters
    - bio, settings, location, tour
- long text: 1000000000 chars
    - html, amp, mobiledoc, markdown

🙄  sort_order for tests

- sort order was not set for the tests, so it was always 0
- mysql could return a different result

in my case:
- field length 156 returned the following related tags ["bacon", "kitchen"]
- field length 157 returned the following related tags ["kitchen", "kitchen"]

Change client.secret to 191

Tweak field lengths

- Add 24 char limit for ids
- Limited fields are the exact length they need
- Unified 1000 and 2000 char string classes to all be 2000
- Changed descriptions to be either 2000, except user & tag which is text 65535 as these may be used to store HTML later?!
- Updated tests

🛠  Update importer tests

- The old 001-003 tests are kind of less relevant now.
- Rather than worrying about past versions of the data structure, we should check that the importer only imports what we consider to be valid data
- I've changed the tests to treat the title-length check as a length-validation check, rather than a test for each of the old versions

🔥 Remove foreign key from subscribers.post_id

- There's no real need to have an index on this column, it just makes deleting posts hard.
- Same as created_by type columns, we can reference ids without needing keys/indexes
2017-02-17 23:20:59 +01:00
kirrg001
a353a9e0ea 🐛 forward missing logging config: rotation
no issue
2017-02-17 18:24:14 +01:00
Hannah Wolfe
b00d9fee6d 🎨 ⏱ Cleanup / optimise the server.init() function (#7985)
refs #2182

* 🔥 Remove unused options from server init
- this is left over from old code and is now unused

* 🎨 Move knex-migrator check to db health

- Move complex check function into own module
- Call module from server/index.js
- This just improves the readability of server/index.js

* 🔥 Remove old comments

- These comments all make no sense now!

* 🎨 ⏱ Move model init out of promise chain

- Model.init() does not return a promise
- Therefore, we can move it to the top of the init function, outside of the promise change
- This should be a minor optimisation, and again improves readability /clarity of what's happening

*  ⁉️ Move DBHash init / first run to Settings model

- this structure is left over from when we had code we executed on the first run of Ghost
- the implementation used the API to initialise one setting before populateDefaults is called
- this had lots of dependencies - the whole model, API, and permissions structure had to be initialised for it to work
- the new implementation is simpler, it captures the dbHash getting initialised during populateDefaults()
- it also adds an event, so we can do first-run code later if we really want to (or maybe apps can?!)
- perhaps this is hiding behaviour, and there's a nicer way to do it, but populateDefaults seems like a sane place to populate a default setting 😁

* ⏱ Optimise require order so config is first

- the first require to config will cause the files to be read etc
- this ensures that it happens early, and isn't confusingly timed as part of loading a different module

* 🎨 Simplify settings model changes
2017-02-17 17:44:34 +01:00
Hannah Wolfe
9bd50cb527 ⏱ Boot time visibility amends (#7984)
refs #2182

* ⏱ Add boot timer - improve visibility of boot time

I've been playing around with Ghost start times a lot recently.
Every time I do, I add a console.time output for boot, which is annoying.
This commit adds that change permanently. We can always revert later before shipping 1.0 😁

* ⏱ Add debug call before main requires

- this demonstrates that the majority of boot time is spent on requires
- had to rejig the var pattern because of the linter... 💩

* 🐷 💄 Special debug mode for config

- I ❤️  being able to output the config, but this is not useful when trying to debug / optimise timings.
- This change makes it so we can see how long it takes to do config work by default
- If we want to output config specifically, we do `DEBUG=ghost:*,ghost-config npm start`
- This also prevents nconf.get() from being called unnecessarily
2017-02-17 16:27:02 +01:00
Greenkeeper
29d04fd6a2 Update ghost-editor to version 0.1.9 🚀 (#8019)
* chore(package): update ghost-editor to version 0.1.9

https://greenkeeper.io/

* chore: yarn.lock
2017-02-17 15:31:28 +01:00
Katharina Irrgang
27f7b722fe 🎨 remove domain string replacement for logging (#8011)
no issue
2017-02-17 15:29:25 +01:00
Katharina Irrgang
dcca1aae5a 🎨 use passport-ghost retry hook (#8009)
no issue
2017-02-17 15:29:03 +01:00
John O'Nolan
f6c438475b New buttons 🎨 (#8007)
Matching commit for https://github.com/TryGhost/Ghost-Admin/pull/529
2017-02-16 19:52:32 +00:00
Greenkeeper
7866579feb Update ghost-ignition to version 2.8.6 🚀 (#8010)
* chore(package): update ghost-ignition to version 2.8.6

https://greenkeeper.io/

* chore: yarn.lock
2017-02-16 15:40:47 +01:00
Greenkeeper
fbea875e6b Update passport-ghost to version 2.2.3 🚀 (#8008)
* chore(package): update passport-ghost to version 2.2.3

https://greenkeeper.io/

* chore: yarn.lock
2017-02-16 12:59:54 +01:00
John O'Nolan
952fac6be4 Update alpha install instructions 2017-02-15 22:02:56 +07:00
Greenkeeper
69d42feb4f Update ghost-ignition to version 2.8.5 🚀 (#8002)
* chore(package): update ghost-ignition to version 2.8.5

https://greenkeeper.io/

* chore: yarn.lock
2017-02-15 12:14:43 +01:00
Greenkeeper
4a36dbcba9 Update passport-ghost to version 2.2.2 🚀 (#7999)
* chore(package): update passport-ghost to version 2.2.2

https://greenkeeper.io/

* chore: yarn.lock
2017-02-14 18:19:39 +01:00
Katharina Irrgang
d9707eb57c public client registration: remember auth url (#7994)
no issue

- we have to remember the auth url in Ghost
- if Ghost starts for the first time, it registers a public client in the defined auth service
- if you change the auth service, Ghost won't recognize
- if Ghost doesn't recognize, you will see a client does not exist error in Ghost Admin
2017-02-14 12:41:28 +00:00
Katharina Irrgang
4f3f01ef56 🎨 optimise public client registration error handling (#7992)
no issue
- auth.init happens in background and if an error occurs, Ghost will log this error to stdout/file
- do not double create Ignition error
- update passport-ghost to handle a none response from the auth service (e.g. wrong auth url), see 123da4dd94
2017-02-14 12:09:52 +00:00
Greenkeeper
ead92cbd59 Update passport-ghost to version 2.2.1 🚀 (#7993)
* chore(package): update passport-ghost to version 2.2.1

https://greenkeeper.io/

* chore: yarn.lock
2017-02-13 19:16:49 +01:00
Katharina Irrgang
2a5927b4f9 🐛 fix email already in use (#7987)
refs #7981

- usage of data.id was wrong
- usage of id comparison was wrong
2017-02-13 15:36:21 +00:00
Katharina Irrgang
d9e87aa793 🎨 updates for database configuration (#7975)
* 🎨  update configuration files: database

refs #7488

- no default database configuration
- production: default is MySQL

* 🎨  add transport stdout to production for now

refs #7488

- production will log to stdout and file for now
- to reduce the risk of confusing users
- users would not see any stdout and they don't know that Ghost logs into file only in production

* 🎨  sanitize database properties

refs #7488
2017-02-11 18:02:12 +00:00
Felix Rieseberg
53bd7da063 🚀 Allow ServiceWorker /ghost/ scope (#7967)
ServiceWorkers can only control the scope from which they have been served. Our service workers live, like all other files, in an `asset` folder - and could in theory only work on other files in there.

This commit fake-serves our service workers from `/ghost/`, thus allowing them to give everything offline powers.
2017-02-11 14:43:09 +00:00
Gabor Javorszky
a341bbde97 Fix typo in function name (#7982)
no issue
- checkDirectoryExistance -> checkDirectoryExistence
2017-02-11 12:48:04 +00:00
Greenkeeper
196d6d02c0 Update knex-migrator to version 2.0.7 🚀 (#7974)
* chore(package): update knex-migrator to version 2.0.7

https://greenkeeper.io/

* chore: yarn.lock
2017-02-10 16:25:10 +01:00
Katharina Irrgang
29fb68137f 🎨 increase token expiry (#7971)
refs #5202
- please read https://github.com/TryGhost/Ghost/issues/5202#issuecomment-278934768
2017-02-10 13:35:58 +00:00
Katharina Irrgang
7bc546c698 🎹 re-work url redirects (#7956)
refs #7488

- we have recently changed our url redirects
- see https://github.com/TryGhost/Ghost/pull/7937
- the url has a canonical meaning and that's why Ghost shouldn't force redirect to the blog url
2017-02-10 11:42:18 +00:00
Hannah Wolfe
1e60cbf16f 🔥 💩 Properly remove pageUrl (#7969)
no issue

- remove references to the old pageUrl helper, which was deprecated in favour of page_url
- this should have been done in a98efe1b68
2017-02-09 20:21:27 +01:00
Greenkeeper
39ec35627b Update knex-migrator to version 2.0.6 🚀 (#7968)
* chore(package): update knex-migrator to version 2.0.6

https://greenkeeper.io/

* chore: yarn.lock
2017-02-09 10:54:56 +01:00
Greenkeeper
ff995f204d Update should-http to version 0.1.0 🚀 (#7944)
* chore(package): update should-http to version 0.1.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 20:14:49 +01:00
Katharina Irrgang
bf7c76b294 Update amperize to version 0.3.4 🚀 (#7964)
closes #7864

- manual PR is needed, because master is on amperize 1.0.0
- but 1.0.0 was not published on purpose
- the latest release is 0.3.4

* chore: yarn.lock
2017-02-08 19:50:58 +01:00
Katharina Irrgang
9a5e10ca9b 🔥 remove unused dependencies (#7965)
no issue
2017-02-08 18:40:19 +00:00
Greenkeeper
44655f6f3d Update superagent to version 3.4.1 🚀 (#7913)
* chore(package): update superagent to version 3.4.1

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 19:36:00 +01:00
Greenkeeper
bc77d05183 Update bson-objectid to version 1.1.5 🚀 (#7863)
* chore(package): update bson-objectid to version 1.1.5

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 18:56:35 +01:00
Greenkeeper
63d9bc7bc5 Update bcryptjs to version 2.4.3 🚀 (#7949)
* chore(package): update bcryptjs to version 2.4.3

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 18:54:16 +01:00
Greenkeeper
16579982f0 Update should to version 11.2.0 🚀 (#7909)
* chore(package): update should to version 11.2.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 18:46:57 +01:00
Greenkeeper
2f4da86574 Update body-parser to version 1.16.0 🚀 (#7859)
* chore(package): update body-parser to version 1.16.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 18:21:14 +01:00
Greenkeeper
4b31aa2988 Update mysql to version 2.13.0 🚀 (#7882)
* chore(package): update mysql to version 2.13.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 17:48:59 +01:00
Greenkeeper
ba377676d0 Update sanitize-html to version 1.14.1 🚀 (#7846)
* chore(package): update sanitize-html to version 1.14.1

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 17:06:09 +01:00
Greenkeeper
b7f4ff8fdb Update multer to version 1.3.0 🚀 (#7896)
* chore(package): update multer to version 1.3.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 17:00:11 +01:00
Katharina Irrgang
72e9f0a95e 🐛 delete all content if subscriber is associated with a post (#7962)
closes #7875
- we need to delete the subscribers before deleting the posts
2017-02-08 15:40:47 +00:00
Greenkeeper
cc01547eef Update express to version 4.14.1 🚀 (#7912)
* chore(package): update express to version 4.14.1

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 16:33:15 +01:00
Greenkeeper
5c08f5fd87 Update fs-extra to version 2.0.0 🚀 (#7851)
* chore(package): update fs-extra to version 2.0.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 16:27:34 +01:00
Greenkeeper
b85bff6bfa Update supertest to version 3.0.0 🚀 (#7917)
* chore(package): update supertest to version 3.0.0

https://greenkeeper.io/

* chore: yarn.lock
2017-02-08 15:42:31 +01:00