Commit Graph

1266 Commits

Author SHA1 Message Date
sanddudu
904727a927 Fix gravatarLookup method
Closes #4511
- Add missing "return"
- Fix error handling
2014-11-25 21:30:53 +08:00
Hannah Wolfe
31ae0c6923 Change RSS content type & use absolute URL in meta
no issue

- changes the content type for the RSS feeds from text/xml to
  application/rss+xml
- changes the link rel=alternate tag to use an absolute URL for the feed
  in the blog meta data
2014-11-24 22:33:49 +00:00
Hannah Wolfe
af7bbb83e4 Merge pull request #4091 from hswolff/remove-a-cd
Removes objectTypeModelMap to reduce circular dependency.
2014-11-24 11:59:07 +00:00
Sebastian Gierlinger
3fd6c80bb7 Merge pull request #4490 from thisishugo/url-safe-tokens
Make tokens URL safe
2014-11-21 11:30:30 +01:00
Jason Williams
b31fec6e2f Fix updateConfigTheme method.
No Issue
- Fix exception being thrown when updateConfigTheme called before
  settingsCache fully populated.
- Remove unnecessary check in a conditional in the migration command
  builder.
2014-11-20 14:54:37 +00:00
Hugo Jobling
11a0f01e25 Make tokens URL safe
Base64 encoding causes some issues when the token is URL encoded
as the = symbol is not a valid URL character. We replace any =
symbols with a - as this is valid in a URL, but is guaranteed
not to appear in a base64 string. This fix ensures that Ghost
password resets work with mail providers such as Mailgun that
add their own tracking redirects

closes #3872 (for real this time)
2014-11-20 11:38:43 +00:00
Hannah Wolfe
1079ef8aeb Merge pull request #4466 from VictorVation/url-validation
Improve validation for user.website
2014-11-17 15:43:25 +00:00
Jason Williams
da095ba551 Merge pull request #4436 from mattiascibien/issue-4232
Do not eagerly fetch relations in when finding all posts
2014-11-17 09:36:42 -06:00
Victor Szeto
2e8e2ce367 Improve validation for user.website
closes #4444
- validate URL without protocol in server and client
- when saving url, add `http://` if the url doesn't have a protocol
2014-11-17 00:40:43 -05:00
Jason Williams
e499e5dda9 Fix invalid image helper URLs when using a subdir.
No Issue
- Strip sub-directory from image paths before passing to
  config.createUrl. Since images are stored with the sub-directory
  and createUrl builds a URL with the sub-directory the result
  would be a URL that contains the sub-directory twice.
2014-11-17 05:32:51 +00:00
Jason Williams
cb544d7e81 Clean up whitespace from #4349. 2014-11-16 18:14:18 +00:00
Matt Enlow
39bf4ed9eb Merge pull request #4349 from yurynix/master
Workaround for outlook, who doesn't like quoted-printable encoding
2014-11-16 09:28:49 -07:00
Jason Williams
15fe121490 Fix gravatar request url.
Refs #4367
- 'http:' was accidentally left out when passing the gravatar
  URL into request, and request requires the full scheme to be present.
2014-11-16 04:33:33 +00:00
Hannah Wolfe
d3f70e3b24 Update showdown to showdown-ghost 0.3.4
closes #2675

- update showdown to the newly published showdown-ghost module which has a fix for the lack of language support in codeblocks
2014-11-15 16:37:35 +00:00
Sebastian Gierlinger
819a978192 Merge pull request #4406 from RaoHai/tag-endpoints
full BREAD Tag endpoints and Tag api tests
2014-11-13 19:25:36 +01:00
Mattias Cibien
8997cd0ffc Do not eagerly fetch relations in when finding all posts
fixes #4232
- do not fetch tags and fields relations in post.findAll()
2014-11-13 11:01:28 +01:00
Jason Williams
a2e670cb0b Merge pull request #4320 from felixrieseberg/iss4235
Work with case-sensitive email addresses
2014-11-12 19:35:38 -06:00
Felix Rieseberg
af1d2201b0 Work with case-sensitive email addresses
Closes #4235
2014-11-12 17:18:53 -08:00
surgesoft
d9643ed2f4 full BREAD Tag endpoints and Tag api tests
close #4263
- implemented full BREAD Tag API
- deleting a tag will also detach its relations to posts
- tests of Tag API
2014-11-13 00:44:36 +08:00
Jason Williams
9ca6a816aa Drop socket reference on close.
Closes #1976
- Prevent the unbounded memory growth caused by maintaining
  a reference to the socket object that is created on every connection.
2014-11-11 19:23:07 +00:00
Jaiden Mispy
31eea94b18 Add footnotes extension to showdown
refs 1318
- based on Markdown Extra https://michelf.ca/projects/php-markdown/extra/
- allows [^n] for automatic numbering based on sequence
2014-11-11 19:24:04 +11:00
Harry Mills
edef05339e Adds SIGTERM handling
closes #4403
- adds SIGTERM handler to match SIGINT handler
2014-11-05 15:38:35 +00:00
Jason Williams
d5f13e1510 Merge pull request #4384 from meowtec/fix-error-log
fix bug in which `logError` could not resolve an err without `message`
2014-11-04 23:20:47 -06:00
meowtec
d42703dd9f Correct logError to log err which has undefined message
closes #4384
 - if err is `object` && `err.message` isNOT `string`, let err = `An unknown error occurred.`
2014-11-05 11:03:33 +08:00
cobbspur
69d4852a6d Create Tags Management Stubs for Ember
closes #4260

- Adds "tags" route inside of the settings routes.
- Adds this route to router.js
- Links the route from the settings.hbs template
- Adds demo tags html in tag.hbs template
- Adds flag for tagsUI
2014-11-04 15:50:41 +00:00
Hannah Wolfe
67e33a65e8 Merge pull request #4317 from cobbspur/image
Created image helper with absolute url option
2014-11-03 15:21:35 +00:00
Hannah Wolfe
fe659117bc Merge pull request #4155 from jgable/importDuplicates
Remove duplicate posts and tags on import
2014-11-03 15:03:44 +00:00
Jason Williams
8249d88cdd Timeout after two seconds on gravatar lookup.
Refs #4277
- Switch from the built-in http module to request and set
  a timeout of 2 seconds on gravatar lookup requests.
- Move request package from devDependencies to dependencies.
2014-10-30 20:01:11 +00:00
Yury Michurin
198017d1a7 Workaround for outlook, who doesn't like quoted-printable encoding
For example, outlook 2013 plus would not interpert the following html
(encoded via quoted-printable encoding):
<a href=3D=22http://engineering=
.como.com/ghost/signup/MTQxNTcwNzM5MTYwN3x5dXJ5QG5peC5jby5pbHx3NVBmUUN4RGZr=
cGhKc3FPOElybXNZNWtzR0FMTU9tRFI5UlNyRWQ4SGJZPQ=3D=3D/=22 style=3D=22color:
=

The workournd forces node-mailer to user base64, which outlook understands
well.
2014-10-28 15:03:32 +02:00
cobbspur
4a56d10c86 Created image helper with absolute url option
closes #4231

- Adds {{image}} helper
- Adds image_spec test unit
- Updated {{ghost_head}} to use image helper
2014-10-28 13:14:41 +02:00
Hannah Wolfe
dbf055907a Merge pull request #4338 from felixrieseberg/iss3858
Enable :author as permalink option
2014-10-28 12:58:39 +02:00
Harry Wolff
6cbcfac72b Removes objectTypeModelMap to reduce circular dependency.
refs #2455

- also note areas where we still have lazy loading of modules.
- moves one lazy loading to non-lazy require.
2014-10-27 20:48:22 -04:00
Jacob Gable
5de5cfe7a1 Remove duplicate posts and tags on import
Issue #806

- Modify sanitize to check for duplicate posts and tags
- Update posts_tags when referencing removed duplicate tags
- Return both data and problems from importData
- Add tests for duplicate posts and tags with fixtures
2014-10-27 18:20:32 -05:00
Felix Rieseberg
c7ad09aace Enable :author as permalink option
Closes #3858
- urlPathForPost is now aware of the author’s slug, allowing for the
permalink setting to use :author
- Frontend controller only renders posts that have the specified
author, if one is given
- Extensive tests included
2014-10-25 18:15:24 -07:00
cobbspur
5aac6d6d69 Escapes strings
closes #4328

- Escapes metaTitle, metaDescription, blog url, blog title, tags
- Updates tests
- Adds test for metaTitle and metaDescription with double quotes
2014-10-24 19:22:37 +02:00
Leonard Camacho
a6a02f31ad Fix no show of default Twitter card
No issue
- change default Twitter card from content to summary
2014-10-22 20:49:06 -04:30
Jilles Soeters
090dc297eb Set link[prev/next] tag to https if urlSSL is set
The <link> tag for next/previous in the head doesn't update when the normal URL and the urlSSL change. This fixes that bug.

Fixes #4266
2014-10-17 20:27:01 +01:00
cobbspur
23e98aa8dc Adds twitter cards and schema.org to {{ghost_head}}
closes #3900

- Adds twitter cards to ghost head helper
- Adds schema json information
- Adds test with null values for post image and cover image
- Adds test for privacy flag
- Adds test for the case of no tags
- Updates test to check for twitter card and schema data
- Updates privacy.md
- Fixes issue with image urls that are linked by url rather than uploaded
2014-10-17 17:26:14 +02:00
Hannah Wolfe
d44a97405b Merge pull request #4220 from felixrieseberg/iss4211
Shorter user slugs (if possible)
2014-10-16 21:23:50 +03:00
Hannah Wolfe
2c6d43a0c0 Refactor helpers & tests into individual files
no issue

- Split theme helpers into individual files for each
- Do the same for tests
- Have utils to share some things between them
- Move assetHash onto config
2014-10-14 22:52:40 +02:00
Matt Enlow
f518782c3c Merge pull request #4269 from javorszky/iss4189
Abstracting away the deprecatedItems
2014-10-13 09:28:14 -06:00
Felix Rieseberg
7bb38f8c7b Accept Invitation: Generate Slug from Name
No issue, but ref #4211
2014-10-13 08:35:08 -04:00
Gabor Javorszky
938b098329 Abstracting away the deprecatedItems
Closes #4189

* moved `deprecatedItems` from within the function to the default config object
* addes tests
2014-10-12 23:04:39 +01:00
cobbspur
487297ff81 Added open graph tags for ghost head helper
issue #3900
- uses isPrivacyDisabled helper to see if useStructuredData has been disabled in config.js
- adds an array of promises to deal with asynchronous data
- resolves asynchronous data then adds open graph tags after canonical link
- featured image and tags are only added if present
- open graph tags only added on post and page
- adds unit test to check correct data is returned
- updates other unit tests to reflect changes
2014-10-08 15:57:49 +01:00
Jason Williams
696fbaaee4 Follow symlinks when resolving theme paths.
Closes #4225
- If a theme is symlinked in the themes directory, follow
  the symlink so that the theme object is populated correctly.
- Only do the fallback loading of theme data in the validations
  module if it doesn't exist in config.
2014-10-02 13:37:18 +00:00
Felix Rieseberg
0025f3d6de Shorter user slugs (if possible)
Closes #4211
2014-10-01 23:27:21 +02:00
John O'Nolan
12f92cd027 Merge pull request #4210 from JohnONolan/fix-copy
[WIP] Fixed email copy grammatical errors
2014-09-30 20:26:11 +02:00
Hannah Wolfe
4e58198381 Merge pull request #4188 from halfdan/1891-move
Abstract the allowed file types out of API
2014-09-29 21:31:22 +01:00
John O'Nolan
71f4b40b2e Fixed email copy grammatical errors 2014-09-29 16:04:02 +02:00
Fabian Becker
72b0a48483 Fix DB API
no ref
- Use correct error type
2014-09-28 19:38:41 +00:00
Fabian Becker
55293d0d1e Abstract the allowed file types out of API
closes #1891
- Moves contentType and extension check to config
2014-09-26 13:31:23 +00:00
Fabian Becker
1d1f24d3d4 Properly server shared files
refs #3992
- Don't use path.join for URLs
- Cache robots.txt for 1h instead of 1y
2014-09-25 14:14:20 +02:00
Hannah Wolfe
e5e7488d4d Fix cache-control header for API routes
closes #4157

- adds cache-control header back to api routes
- moves cache rules object into testUtils
- adds cache-control header test to every existing API test
2014-09-25 11:06:28 +01:00
Jason Williams
485c296c29 Merge pull request #4127 from ErisDS/msg-update
Updating messages to use errors module
2014-09-23 14:48:40 -05:00
Hannah Wolfe
0f6649cc1d Updating messages to use errors module
no issue

- only updated the messages that are errors or warnings
- changed the structure of the messages to follow the 3-arg format
2014-09-23 19:55:07 +01:00
Hannah Wolfe
d1abc6c0f2 Merge pull request #3962 from halfdan/2249-is-context
Implements is-helper
2014-09-23 17:05:13 +01:00
Hannah Wolfe
792e748e2f Merge pull request #4093 from halfdan/update-helpers
Update meta_* helpers.
2014-09-23 15:28:24 +01:00
Fabian Becker
801c5248c2 Update meta_* helpers.
no ref
- Return meta_description from post.meta_description if set
- Return meta_title either from post.title or post.meta_title if set
- Adds tests
2014-09-23 14:06:52 +02:00
Fabian Becker
aa5cf6ed3b Implements is-helper
closes #2249
- Added context to res.locals
- Added context aware is helper
- Added unit tests
2014-09-23 11:31:16 +02:00
Gabor Javorszky
1f5a378b4c Deprecated mail.fromaddress, mail.from is Title <email@address>
Closes #4018

* cleaned up `mail_spec.js`
* deprecated `mail.fromaddress`
* implemented 'Blog title <email@address.com>' format with fallbacks
* added tests to deprecation and from address, made existing ones more robust
* moved domain intuit into its own module: `GhostMailer.getDomain()`
2014-09-23 09:33:20 +01:00
Gabor Javorszky
b3820fbb31 More robust deprecation check code
Closes #4082
* reformatted code to allow for traversal
* deeper config items should be denoted like this: `object.object.object.property`.
* added tests for testing the deprecation warnings
2014-09-23 09:33:20 +01:00
Jason Williams
410dc39f3e Add checks for packages and contentPath to startup
Refs #3864
- Make sure that require() is able to resolve all dependencies
  listed in package.json.  If packages are missing halt the
  bootstrap process and display an error and help message for user.
- Check that contentPath and its subdirectories exist with the correct
  permissions.
- Check sqlite3 database file is set for read/write access.
2014-09-22 21:27:34 +00:00
Hannah Wolfe
9f7d008f47 Merge pull request #4074 from halfdan/4069-rename
Naming cleanup
2014-09-22 22:21:46 +01:00
Fabian Becker
2c3abeee03 Naming cleanup
closes #4069
- Rename everything from camelCase to lowercase + dashes
- Remove usage of `server`, `app` and `instance`
2014-09-20 21:09:16 +02:00
Fabian Becker
b7be4adede Change HTML email link to hide token
closes #3305
- Hide token in HTML email
2014-09-20 11:08:27 +00:00
Hannah Wolfe
a3093b9b42 Merge pull request #4075 from jaswilli/morgan
Adjust morgan call to avoid deprecation warning
2014-09-19 20:39:05 +01:00
Fabian Becker
3e6d11e8fa Fix ghost-ui reference
fixes #4072
- Correct reference to ghost.min.css
2014-09-19 18:31:21 +00:00
Jason Williams
12957b1918 Adjust morgan call to avoid deprecation warning
No Issue
- Change the invocation of the morgan logging package to
  conform to the new function signature introduced in
  morgan 1.2.0.
2014-09-19 16:31:22 +00:00
Hannah Wolfe
5cdb6510ae Merge pull request #4065 from jaswilli/transition
Prevent transition to signup on invalid invitation
2014-09-19 17:17:13 +01:00
Hannah Wolfe
cb9d9b748a Merge pull request #4062 from halfdan/4059-skip-not-found
Ignore unknown setting keys on import
2014-09-19 16:54:35 +01:00
Fabian Becker
0efb449103 Delay updateCheck to +24h on error
fixes #4036
- delay update check by 24h when an error happens
- set connection timeout to 10 seconds
2014-09-19 17:10:30 +02:00
Fabian Becker
9394fad6aa Have /ghost use its own express instance
closes #1961
- Refactor admin to use its own express instance
- Refactor middlewares to work with /ghost mounted admin express instance
2014-09-19 08:57:13 +00:00
Jason Williams
63546be1eb Prevent transition to signup on invalid invitation
Refs #3876
- Prevent signup page from flashing when an invalid invitation
  token is used.
- Clear sensitive information from signup controller.
- Make isInvitation API behavior consistent with other auth
  related APIs.
2014-09-19 04:52:45 +00:00
Matt Enlow
9fb038f8d3 Merge branch 'pr/3876'
* pr/3876:
  Redirect user if signup invitation isn't valid
2014-09-18 19:22:39 -06:00
Felix Rieseberg
b1c1b03015 Redirect user if signup invitation isn't valid
Closes #3565
- Added server API isInvitation (analog to isSetup), checking if an
invitation exists for a given email address.
- If the invitation is no longer valid (or didn’t exist in the first
place), the user is redirected and an error notification is shown.
2014-09-18 19:11:40 -06:00
Matt Enlow
a4de40abc6 Merge pull request #3976 from halfdan/1889-generate-slug
Cleanup reserved words in generateSlug
2014-09-18 18:54:48 -06:00
Matt Enlow
a5f4fca7b2 Merge pull request #3992 from halfdan/favicon
Let Ghost serve favicon instead of using dependency
2014-09-18 18:40:22 -06:00
Fabian Becker
4cc1f509ac Ignore unknown setting keys on import
fixes #4059
- Ignore NotFound setting keys
2014-09-18 12:48:18 +00:00
Fabian Becker
c9b0df752f Cleanup reserved words in generateSlug
closes #1889
- Adds a new filter for slugs
- Move slugs to config.slugs
2014-09-18 13:56:51 +02:00
Fabian Becker
f2fcb5b62b Let Ghost serve favicon instead of using dependency
no ref
- Remove static-favicon dependency
- Refactor robots.txt middleware to also serve favicon
- Add ETag
2014-09-18 13:51:41 +02:00
Hannah Wolfe
aad595de7d Updating express to 4.9.2 & related packages
ref #3795

- express updated to 4.9.2
- express 4.9.0 introduced res.sendStatus() to replace res.status().end()
- we no longer need express-session, connect or cookie-parser
- body-parser, busboy, compression, express-hbs, morgan, all bumped to
  latest versions as well - there doesn't seem to be any breaking changes
2014-09-18 11:50:28 +01:00
Harry Wolff
469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00
Harry Wolff
457f360765 Updates image upload directories to be number based.
resolves #2285

- Moves to using moment.format('MM') to use the date formatting of a month
2014-09-16 13:23:29 -04:00
Paul Davis
fcab1a961b Merge pull request #4033 from halfdan/getting-typos
Fix Markdown help modal table positioning
2014-09-16 16:36:53 +01:00
Hannah Wolfe
b7fdf7d872 Merge pull request #3947 from hswolff/goodbye-config-theme
Removes config.theme and restructures how theme variables are cached
2014-09-15 21:30:44 +01:00
Hannah Wolfe
aa0d9fda46 Merge pull request #4025 from mvalipour/master
URL replacement in RSS feed mucks with content
2014-09-15 20:35:18 +01:00
Jason Williams
d93bf82795 Merge pull request #4005 from ErisDS/dbhash-first-run
Fixes the first run messages
2014-09-15 08:28:06 -05:00
Hannah Wolfe
b890f31d98 Fixes the first run messages
no issue

- Whilst testing the mail PR #3915 I noticed the first run messages aren't
  appearing because the dbHash is getting pre-populated, but there doesn't
  appear to be a reason why this is necessary
2014-09-15 09:49:25 +01:00
Fabian Becker
7830d68000 Fix Markdown help modal table positioning
no ref
- Fix top spacing of markdown table
- Fix width of table and left align table head
- Fix grammar, whitespace in getting-started post
2014-09-15 09:56:54 +02:00
Hannah Wolfe
7b71d0cbc2 Merge pull request #3948 from hswolff/refactor-storage-module
Moves storage module to use prototypes for inheritance and structure.
2014-09-14 11:16:01 +01:00
Mo Valipour
98d0954e32 Fix URL replacement in RSS feed mucking with content
closes #3983
- removed naive regex implementation
- added cheerio to project dependencies
- used cheerio to parse RSS content
- use attribute getter/setter to replace href/src attribute urls with the resolved version
2014-09-13 18:11:07 +01:00
Hannah Wolfe
5faeb2996b Merge pull request #3874 from morficus/issue-3241
adding config flags to control all items mentioned in PRIVACY.md
2014-09-13 17:23:56 +01:00
Maurice Williams
3583515e44 adding config flags to control all items mentioned in PRIVACY.md
closes #3241
- in config.js, the `privacy` attribute holds all privacy-related flags
- `privacy.userTinfoil: true` disables everything (equivalent to setting all flags to false)
- added helper function to core/server/config/index.js to checking privacy flags
- added helper function to core/server/config/index.js to show warning about deprecated items
2014-09-13 12:04:01 -04:00
Harry Wolff
66845def85 Moves storage module to use prototypes for inheritance and structure.
addresses #2852

- Moves storage modules to use prototypes and to create prototypes
that inherit from the base storage ctor.

- Makes storage/base conform to an all Promise interface.
2014-09-12 21:41:29 -04:00
Hannah Wolfe
07eaaae8bf Merge pull request #3915 from javorszky/iss1538b
Replaces sendmail with direct
2014-09-11 20:47:18 +01:00
Fabian Becker
c684ee5b38 Delete revoked tokens
closes #3758
- new API method to delete access and refresh token
- use new ember-simple-auth config to revoke tokens on logout
- new method to delete tokens by .. token
2014-09-10 20:19:52 +02:00
Hannah Wolfe
a21ce4dd55 Merge pull request #3990 from halfdan/handle-addrinuse
Handle EADDRINUSE
2014-09-09 19:16:03 +01:00
Fabian Becker
5430e72753 Handle EADDRINUSE
no ref
- Show a human readable message on EADDRINUSE
2014-09-09 20:05:11 +02:00
Hannah Wolfe
2aff9ed8eb Force apps flag to be boolean in config API
ref #3969

- it shouldn't be possible to set keys via this flag
2014-09-09 08:40:38 +01:00
Gabor Javorszky
187c486b2f Replaces sendmail with direct
Closes #1538
* rips out sendmail
* adds direct
* updates nodemailer to 0.7.1
* changes unit tests for mail
* changed integration tests for mail
* adds mail api tests
2014-09-08 20:52:10 +01:00
Matt Enlow
9c0b203dce Merge pull request #3867 from hswolff/middleware-work
Makes the Ghost application more express middleware friendly.
2014-09-08 13:43:48 -06:00
Hannah Wolfe
805f45900e Merge pull request #3902 from Chrisui/custom-tag-templates
Custom template files for custom tags
2014-09-08 20:14:48 +01:00
Chris Pearce
97946cbc14 Ability to create custom template files for custom tags. Eg. tag-design.hbs 2014-09-05 17:35:30 +01:00
Thai Phan
76f7412a75 Stop packagePath variable from being undefined 2014-09-05 22:52:24 +10:00
Jason Williams
c5b1319936 Merge pull request #3852 from ErisDS/issue-1967
Add the new body classes
2014-09-03 10:13:06 -05:00
Harry Wolff
2bb1b14ebd Removes config.theme and restructures how theme variables are cached
resolves #1789

- removes config/theme.js
- moves caching of theme variables to api/settings.js which is where the
rest of the settings cache occurs.  this removes the requirement of having
to push changes to cache, now it simply occurs alongside when settings
are changed.
- updates relevant tests.
2014-09-02 23:15:15 -04:00
Hannah Wolfe
e0924f866a Merge pull request #3912 from halfdan/3909-config-api
Remove permissions from configuration API
2014-09-02 20:29:09 +01:00
Fabian Becker
c0adf5894f Remove permissions from configuration API
closes #3909
- Remove permissions from configuration API
- Remove permission setup from integration test
- Remove permissions from permissions.json
2014-09-02 15:48:32 +00:00
Fabian Becker
33a6b3d6a6 Add alternative names for pg
refs #3864
- map alternative valid pg names to pg
2014-09-01 21:29:12 +00:00
Hannah Wolfe
17f5ce6a2c Merge pull request #3888 from felixrieseberg/iss3884-content
Return leading image for {{content words="0"}}
2014-09-01 20:13:32 +01:00
Fabian Becker
5ab8c661ec Fix regex from #3898
refs #3898
2014-09-01 15:39:53 +02:00
Sebastian Gierlinger
57b5f4da00 Merge pull request #3841 from halfdan/3619-configuration-api
Implements new Configuration API
2014-09-01 15:15:05 +02:00
Fabian Becker
a0b7941439 Restrict uncapitalise middleware for API
no ref
- Do not lowercase anything after /api/v0.1/<resource>/ to protect :key/:slug
2014-09-01 12:38:06 +00:00
Fabian Becker
688b3914e4 Implements new Configuration API
closes #3619
- adds new permissions for configuration API
- adds integration tests
- adds configuration API for reading allowed values
2014-08-31 20:54:17 +00:00
Hannah Wolfe
2a843c309e Adding Grunt tasks for Sass 2014-08-31 14:16:58 +01:00
Harry Wolff
4951f267f9 Remove shim files that were created to address #1873.
refs #1873

- Removes all shim files.
2014-08-29 17:39:54 -04:00
Harry Wolff
8bc6a6e633 Makes the Ghost application more express middleware friendly.
refs #827

- Moves ./index to use Ghost in a similar manner to how someone uses
Ghost as an npm module.
- Allows Ghost to be cleanly mounted on another express application
on any arbitrary endpoint, all you need to customize is the mount path.
2014-08-29 17:30:16 -04:00
Hannah Wolfe
1ed286d09e Merge pull request #3866 from hswolff/config-updates
Move config module to be instance based and merge bootstrap into config.
2014-08-29 21:35:56 +01:00
Felix Rieseberg
1b203dc42a Return leading image for {{content words="0"}}
Closes #3884
- This PR includes a reimplementation of Downsize@0.0.5 with `words: "0"`. It uses the same parsing methods, therefore guarunteeing identical behavior.
- Tests have been updated to be more extensive.
2014-08-28 09:51:00 -07:00
Jason Williams
35e2387541 Run import run operations in order.
Closes #1977, Refs #3473
- Ensure that import operations are run in sequence.
  Previously the operations were started in order but subsequent
  ops were allowed to begin before the previous finished, which would
  result in out-of-order execution.
- Fix bug in attach() where a model property was being passed in
  instead of a transaction object.  If the call was made when a
  transaction was in process, it could cause bookshelf/knex to
  hang and never finish the transaction.
2014-08-28 00:21:13 +00:00
Hannah Wolfe
25ad4b39fd Uncapitalise middleware should not affect tokens
no issue

- Whilst testing on next, I noticed trying to signup didn't prepopulate email addresses any more, and this is why
2014-08-26 22:30:33 +01:00
Hannah Wolfe
93e4cfdadf Merge pull request #3855 from felixrieseberg/iss3844-importer
Importer: Sanitize UUIDs
2014-08-26 16:51:49 +01:00
Sebastian Gierlinger
cab8254539 Merge pull request #3860 from ErisDS/issue-3857
Redirect uppercase routes to lowercase version
2014-08-26 12:19:52 +02:00
Sebastian Gierlinger
bb9eee9b4c Merge pull request #3865 from ErisDS/issue-3750
Delete tokens before deleting a user
2014-08-26 12:16:49 +02:00
Hannah Wolfe
5856cdd67e Merge pull request #3861 from cobbspur/metas
Added correct contextual Meta Titles and Descriptions
2014-08-24 18:58:23 +01:00
Felix Rieseberg
6fe93f6a50 Importer: Sanitize UUIDs
Closes #3844
- Before importing, all data is checked for incorrect UUIDs. If check
fails, data is sanitized and outfitted with correct UUIDS.
- Scaffolding allows for easy implementation of additional
sanitization, should that be required in the future.
- Test included, old tests updated.
2014-08-23 18:02:23 -07:00
Harry Wolff
583c7970d9 Move config module to be instance based and merge bootstrap into config.
helps with #827, otherwise no issue

- This is general code clean-up and unification.
- Merges code from bootstrap.js into config module as they were both
concerned with managing the config file and as such should be in one
location.
- Updates all relevant tests.
2014-08-23 15:54:43 -04:00
Hannah Wolfe
74c6a341be Delete tokens before deleting a user
fixes #3750

- Updated tests to create tokens for one user. This caused the tests to
  fail for MySQL exposing the bug.
- Delete user's tokens along with posts
2014-08-23 20:13:17 +01:00
Jason Williams
07ad400ee0 Replace the when promise library with bluebird.
Closes #968
2014-08-23 17:15:40 +00:00
Hannah Wolfe
6a52fc8ace Redirect uppercase routes to lowercase version
fixes #3857

- adds uncapitalise middleware which detects uppercase in req.path and
  redirects to the lowercase equivalent
- change the ghost route to a regex, just so it's consistent with other
  routes in the file
2014-08-23 17:59:58 +01:00
cobbspur
8604601027 Added correct contextual Meta Titles and Descriptions
closes #2462

- adds conditionals for pagination for index, tags and author pages
- outputs correct meta title and description according to context
- adds further unit testing
2014-08-23 17:42:05 +01:00
Hannah Wolfe
2800671bbd Add the new body classes
closes #1967

- adds paged to eventually replace archive-template
- adds page-template to eventually replace page
- changes custom page template class to be page-slug instead of
  page-template-slug
2014-08-22 10:33:35 +01:00
Josh Vanderwillik
1438278ce4 Extract starting functionality into an exported class
closes #3789
- Create a GhostServer class to manage state
- index.js now calls start on the exported server
- Alter tests to expect a GhostServer instance
2014-08-21 17:04:39 -04:00
Hannah Wolfe
3a1839dfa3 Merge pull request #3817 from felixrieseberg/iss685
Prev & Next Links for Ghost_Head
2014-08-20 20:59:55 +01:00
Felix Rieseberg
15e4dd1e9f Pre & Next Links for Ghost_Head
closes #685
- Now that we have a ‘pagination’ meta object, we can implement
SEO-friendly `next` and `prev` ref links in `<head>`.
- This implementation works uniformly for anything that supports
pagination in the current schema (posts, tags, authors)
- Regex should make the implementation future-proof for additional
pagination
2014-08-20 12:28:21 -07:00
Jason Williams
e03d503add Ignore tables with pg_ prefix in pg getTables.
Closes #3825
- Fixes an issue where a PostgreSQL extension may create
  a public table and it gets caught up in the migration process.
2014-08-20 14:20:18 +00:00
Sebastian Gierlinger
f0da28abb3 Fix broken status code
closes #3779
- added custom error classes for OAuth errors (bug was caused by
oauth2orize error classes)
- added basic tests for `/authentication/token` endpoints
2014-08-20 11:28:55 +02:00
Hannah Wolfe
f2aefd257e Removing remaining references to Polyglot
refs #3802
2014-08-19 16:36:26 +01:00
Hannah Wolfe
e6bb7c4443 Merge pull request #3802 from ErisDS/i18n
Removing prototypal i18n code
2014-08-19 15:25:40 +01:00
Hannah Wolfe
09383dc181 Merge pull request #3777 from hswolff/lazy-models
Move Models module to have an init method that sets up all models
2014-08-19 15:24:55 +01:00
Felix Rieseberg
02f11fad31 Center default user-error (404, etc.)
See #3810
- Only thing missing: <div id=“container”></div>. Added.
2014-08-18 16:45:03 -04:00
Harry Wolff
5ff2a31ce1 Move Models module to have an init method that sets up all models
resolves #2170

- creates a models.init() function that requires all other model files
and caches them.  This is opposed to the previous functionality where
when you require('./models') it would immediately require all other models.
Now it's done when you want.

- Updates all tests to reflect the new structure of the model module
2014-08-18 15:54:10 -04:00
John O'Nolan
c4b87bbfeb Content management cleanup 2014-08-17 15:01:35 +03:00
John O'Nolan
5f0bca1166 Disable Pinterest inside Ghost admin 2014-08-17 14:58:03 +03:00
Hannah Wolfe
b91dee35c4 Removing prototypal i18n code
refs #16, #17, #18, #19, #20, #21, #3801

- This code was a prototype system built when Ghost was still a prototype.
  It was never fully implemented and hasn't actually worked for ages.
- Now that the admin is in Ember, it's likely we'll need a very different
  system.
2014-08-16 17:29:54 +01:00
Hannah Wolfe
9b7be32c0c Merge pull request #3775 from felixrieseberg/iss3765
Ensure Owner's role isn't downgraded
2014-08-16 17:07:41 +01:00
Felix Rieseberg
47ba9a7385 Ensure Owner's role isn't downgraded
closes #3765
- Simple API check to ensure that the owner isn’t downgraded to a
different role (analog to the ’can’t change your own role’ check)
- Test added to ensure Owner can't be downgraded to a lower role
2014-08-15 17:44:30 -04:00
Hannah Wolfe
7f4231c83d Merge pull request #3791 from ErisDS/issue-3790
Display correct new Ghost version
2014-08-15 18:34:03 +01:00
Hannah Wolfe
260d9562e4 Merge pull request #3670 from felixrieseberg/iss3641
Validation fix for number of posts/page
2014-08-15 18:27:14 +01:00
Hannah Wolfe
52d0a83dc2 Display correct new Ghost version
closes #3790
2014-08-15 18:23:55 +01:00