2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

800 commits

Author SHA1 Message Date
Tim Griesser
f87e0d364d Bumping to Knex 0.6.12, Bookshelf 0.7.1 2014-06-10 17:07:53 -04:00
Jason Williams
d9c45b4967 Fix export of data during database migration
Closes #2927
-refactor exporter to export tables that exist in the
 database instead of keying off of schema.js
-move some shared database utility functions into their
 own module
2014-06-09 21:07:21 +00:00
Harry Wolff
5d028b72fb Upgrade to Express 4.0
no related issue

- Updates package.json packages, adding express middleware packages
 that have been broken into their own modules

- Updates controllers/frontend.js to use the new Layer object that Express 4.0
 has.  Requires some monkey-patching as the Layer object isn't explicitly
 surfaced, however it should be safe to do.

- Moved the setup of routes into middleware/index.js because they need to
 be added as a middleware function before the 404 and 500 handlers. This is
 no longer possible with the old app.use(app.router) as that has been removed.

- Cleaned up middleware/index.js to make it compatible with Express 4.0.

- Simplified the way themes are activated and enabled when they are activated.
 The new handling is simpler, yet should still cover all the use cases that
 previously existed.

- The entire flow of activating a theme through middleware should be a little
 more centralized, letting it be easier to read and maintain.

- Moved every routes/*.js file to use an individual express.Router() instance.
2014-06-08 17:41:25 -04:00
Gabor Javorszky
52299998e2 Removed API dependency from mailer and api/mail
Fixes #2836.

* Mailer now only handles sending email and initializing settings. Instead of adding new notifications there, it just sets flags on its own object.
* Mailer now checks for the presence of "to". If there is none, it fails. You should really pass a full mail object complete with "to", "subject" and "html", otherwise it's partial content.
* Therefore Mail API doesn't check for the existence of the "to", and doesn't get the email from settings and substitute that
* index.js now has a method that adds the notifications. I figured adding those THERE is probably better than individually in every module. It is, as the comments say, can be made extensible
2014-06-08 17:41:07 +01:00
Jason Williams
e7e6dfc3e6 Clear any existing SIGINT listeners during startup
No issue
-remove any existing listeners on the SIGINT event during
 the ghost bootstrap process.  handles an issue during testing
 where node was warning about too many listeners.
2014-06-07 15:05:33 +00:00
Hannah Wolfe
b7aca05d95 Merge pull request #2880 from halfdan/2879-socket-issue
Fix error when running Ghost with a socket
2014-06-05 13:45:01 +01:00
Hannah Wolfe
5190f1f0e4 Merge pull request #2876 from halfdan/2833-rasperize-cache
Cache invalidation for post update
2014-06-05 13:44:22 +01:00
Hannah Wolfe
42af74b073 Merge pull request #2877 from jaswilli/2866-slugs
Update slug API to work with additional types
2014-06-05 13:43:46 +01:00
Fabian Becker
f9369459db Fix error when running Ghost with a socket
fixes #2879
- Syncronously unlink old socket file
2014-06-04 18:17:32 +00:00
Fabian Becker
340192c5da Cache invalidation for post update
closes #2833
- Handle status change of post
2014-06-04 18:11:28 +00:00
Hannah Wolfe
afec0bc660 Merge pull request #2873 from jaswilli/2849-delete-posts
delete posts from post settings menu
2014-06-04 15:15:37 +01:00
Jason Williams
39967b02da Enable post deletion from Ember admin
Closes #2849
-wire up delete post action in ember admin
-refactor ember modal dialog
-override RESTAdapter.deleteRecord to workaround Ember expecting
 an empty response body on DELETEs
2014-06-04 13:19:57 +00:00
Jason Williams
bb4a0a3540 Update slug API to work with additional types
Closes #2866
-update slug API to handle users and apps in addition to
 posts and tags
-update existing tests
-add new functional tests for slug endpoint on http api
2014-06-04 05:54:03 +00:00
Hannah Wolfe
9e8e1fa37d Ember redirect to signup
closes #2779

- adds temporary code to redirect the ember admin to signup if a user doesn't exist.
- done serverside as this makes most sense?
2014-06-03 19:21:45 +01:00
Hannah Wolfe
59147bbb6d Merge pull request #2862 from morficus/master
refreshless user logout
2014-06-03 19:19:14 +01:00
Hannah Wolfe
57a5b6a188 Full pass at inline API Docs
closes #2622, ref #2125
2014-06-03 14:05:25 +01:00
Hannah Wolfe
4b6f8ce06d Mail API fixes
- The mail API endpoints weren't quite working correctly. Now working but still need love
2014-06-03 12:31:14 +01:00
Maurice Williams
6fda048827 refreshless user logout
fixes #2842
- new Ember route for signout
- new API route to allow async signout
2014-06-02 17:12:02 -04:00
Hannah Wolfe
beb078b52c Merge pull request #2841 from gotdibbs/847
Export backup prior to migration
2014-06-01 22:00:11 +01:00
jomahoney
ae330e45f6 Added error link on 404 pages
closes #2298
- added hyperlink to error templates
- added class for styling hyperlinks on error pages
2014-06-01 19:02:48 +01:00
William Dibbern
07df9911ce Export backup prior to migration
Closes #847
- Added logic to export database to the `core\server\data\` folder prior
to beginning a migration.
- Factored out versioning logic from migration to prevent circular
references
2014-05-31 18:56:09 -05:00
Connor Tumbleson
5933ee3afe escapes meta title/description
closes #2663
adds unit-test
2014-05-31 11:08:09 -05:00
Hannah Wolfe
d3c1bdb758 Merge pull request #2820 from jgable/fix403
Fix 403 errors after signup
2014-05-29 15:39:00 +01:00
Hannah Wolfe
0d04357e4e Merge pull request #2718 from jgable/emberData
Ember Data with Posts
2014-05-29 15:27:19 +01:00
Jacob Gable
5abeadf80d Ember Data with Posts
Ref #2699

- Introduce ember data dependency
- Add loadInitializers and refactor most initializers into one combined
- Add Post ember data model
- Refactor generateSlug to use title of post and ghostPaths
- Refactor post controller to not reference model.property everywhere
- Use RESTAdapter for posts, users and tags
- Setup author and tag relations in Post model
- Fix broken API calls by adding CSRF header
- Add initiaizer for csrf value
- Use actual User model for current user initializer
- Add action for setting featured post, test with actual api call
- Fix the sending of UUID's up to the server
- Refactor current-user to use ember-data store
- If a user is preloaded in the application, use pushPayload to put it
in the store
- Do a lookup on the store to get an actual User model for injection
- Fix posts/post controllerName in route/new.js
- Alter signup process to push user into ember data store
2014-05-29 07:42:51 -05:00
Jason Williams
503c407090 Clean up routes. Use new slug endpoint in admin.
refs #2814
-removed route /posts/slug/:title due to API change
-changed admin to use new slug endpoint
-removed duplicate notifications routes
2014-05-28 03:59:06 +00:00
Jacob Gable
dc58d6936a Fix 403 errors after signup
Closes #2819

- Keep around the _csrfSecret on the session after regenerating
2014-05-26 20:01:45 -05:00
lennerd
bebafdc9a9 Refactore slug API for generating tag and post slugs.
Closes #2601
- Removed slug generation from the post API
- Added new, self-contained slug API
- Fixed slug permissions in the fixtures files
- Added a HTTP route for the new API method
- Added integrational tests
2014-05-26 10:07:05 +02:00
Hannah Wolfe
51090acf54 Merge pull request #2799 from jaswilli/issue-2798
Fix content preview actions and add tests
2014-05-24 12:23:56 +03:00
Hannah Wolfe
2aad15373c Merge pull request #2780 from jgable/ember-signup
Implement signup in Ember
2014-05-24 09:29:39 +03:00
Sebastian Gierlinger
ec46dc93ec Merge pull request #2801 from ErisDS/issue-2773
correct settings.edit call signature for installedApps
2014-05-24 08:19:16 +02:00
Hannah Wolfe
4aabce4474 correct settings.edit call signature for installedApps
closes #2773

- this is left over from my refactoring work
2014-05-24 08:21:17 +02:00
Sebastian Gierlinger
217e3ed7ad Improve status codes
closes #2187
- added UnsupportedMediaTypeError (code: 415)
- added status code 201 if a new object was created
- Updated tests
2014-05-24 08:05:12 +02:00
Jason Williams
669f7f8b0c Fix content preview actions and add tests
Closes #2798
-fetch full model for active post in Backbone content preview view
-remove unnecessary type check in Models.Post.saving
-add functional tests for all post settings menu actions in editor screen
-add functional tests for all post actions in content preview
 screen for posts with and without tags
2014-05-23 20:54:02 +00:00
Jacob Gable
006aedfb84 Implement signup in Ember
Closes #2410

- Add signup action that posts to signup endpoint
- Fix nav bar showing on signup page
- Fix image link when a user hasn't set their image yet
- Redirect to the ember/signin page if requesting an ember page
2014-05-23 12:17:28 -05:00
Hannah Wolfe
11cf0ae125 Merge pull request #2791 from shindakun/assetcache
Make cache max-age on theme assets one year.
2014-05-23 19:05:49 +03:00
Hannah Wolfe
83f7cfe08b Merge pull request #2788 from jaswilli/issue-1842-tests
Add tests for handlebars core helper functions
2014-05-23 16:15:16 +03:00
Martijn Swaagman
f7d2b6bd82 [fix] always add quotes 2014-05-23 14:37:03 +02:00
Martijn Swaagman
83742837c2 [docs] absolute=true will add options.hash
Ran into this will calling the helper from a theme, tried to get the absolute url, but just providing {{url absolute}} wasn't enough. After explicitly adding `=true` it worked.
2014-05-22 21:06:26 +02:00
Steve
5f7182b7a2 Make cache max-age on theme assets one year.
closes #2790
- Added one year in ms var.
- refs: #2447
2014-05-22 07:55:38 -07:00
Jason Williams
9d16e72bb0 Add tests for handlebars core helper functions
Closes #1842
-add unit tests for core helper functions
-fix up coreHelpers.e
-clean up coreHelpers.pagination
2014-05-22 03:57:52 +00:00
Jacob Gable
42a1d55858 Improve signin
Ref #2413

- Remove fixture and use actual API
- Store and send down actual logged in user data
- Refactor isLoggedIn to use computed property on application
- After signin, update user data in dependency container
- Add CSRF to all routes and controllers via initializer
- Update authenticated route to check for user.isLoggedIn
- Add notifications for signin error
- Add notifications.showAPIError helper
- Add plumbing for refreshless signup to doSignUp in admin controller
2014-05-15 09:18:43 -05:00
Hannah Wolfe
c02ebb0dcf Refactor API arguments
closes #2610, refs #2697

- cleanup API index.js, and add docs
- all API methods take consistent arguments: object & options
- browse, read, destroy take options, edit and add take object and options
- the context is passed as part of options, meaning no more .call
  everywhere
- destroy expects an object, rather than an id all the way down to the model layer
- route params such as :id, :slug, and :key are passed as an option & used
  to perform reads, updates and deletes where possible - settings / themes
  may need work here still
- HTTP posts api can find a post by slug
- Add API utils for checkData
2014-05-15 10:41:05 +01:00
Jacob Gable
f565dd505a Fix sign up not setting user on session
No issue found

- Grab user out of api response from users[0]
2014-05-14 20:38:58 -05:00
Hannah Wolfe
f1a3f1a7a5 Merge pull request #2753 from jgable/fixPermissable
Add apps permissable checks in posts and users
2014-05-14 22:10:44 +01:00
Hannah Wolfe
692573a241 Merge pull request #2735 from shindakun/tag404
Display 404 page if tag does not exist.
2014-05-14 16:32:18 +01:00
Hannah Wolfe
4c0010db45 Merge pull request #2673 from halfdan/2592-tags-api
Implements new Themes JSON API
2014-05-14 16:31:36 +01:00
Jacob Gable
0dc6dc29a7 Add apps permissable checks in posts and users
Closes #2738

- Re-introduce the TargetModel.permissable interface check in the
regular permission flow path
- Pass loadedPermissions, hasUserPermission and hasAppPermission to
permissable interface to reduce logic necessary
- Refactor recursive call to pass original arguments but with actual
model
- Refactor canThis(this.user) use in api/posts.js to just canThis(this)
2014-05-14 09:22:25 -05:00
Sebastian Gierlinger
d1149a927b Fix validation
- fixed validation that broke when introducing error classes
- added a test
2014-05-14 15:30:46 +02:00
Fabian Becker
628654961a Implements new Themes JSON API
closes #2592
- Add themes browse/read endpoint
- Add new permissions for themes (only admin by default)
- Add integration tests
2014-05-14 11:23:42 +02:00