Commit Graph

2986 Commits

Author SHA1 Message Date
Hannah Wolfe
65230cf1b8 Merge pull request #3302 from jgable/fixUserMe
Fetch actual user in settings/users/user
2014-07-17 18:01:55 +01:00
Jacob Gable
d874e79dbd Fetch actual user on settings/users/user
Closes #3279

- Switch from this.session.get('user') to this.store.find('user') and
some further limiting until a custom user adapter is created
- Switch the deactivate logic to rollback the used model
- Pass the user as the model in the link-to in user list template
2014-07-17 10:44:39 -05:00
Hannah Wolfe
cfaa6f058a Wire permmissions for notifications, mail and tags
closes #2739

- wraps the api endpoints for mail, notifications, and tags in a canThis
  check
- add internal context to internal calls
- updates tests
2014-07-17 16:44:09 +01:00
Hannah Wolfe
efa7665124 Merge pull request #3310 from sebgie/issue#3128-2
Fix tests failing because of spam protection
2014-07-17 16:41:31 +01:00
Hannah Wolfe
b46aa2b576 FORCE_MIGRATION ensures fixtures are added
refs #2600, refs #3296
2014-07-17 13:54:03 +01:00
Hannah Wolfe
6ab8a37f79 Merge pull request #3300 from ErisDS/issue-2739
Adding and renaming permissions
2014-07-17 13:25:47 +01:00
Hannah Wolfe
c28167c971 Merge pull request #3304 from JohnONolan/noplaceholder
Removing erroneous placeholder text from user profile
2014-07-17 13:23:04 +01:00
Sebastian Gierlinger
ab456638c1 Fix tests failing because of spam protection
closes #3128 (now really)
- added express variable disableLoginLimiter
- added disableLoginLimiter to all tests that use Ghost as module and
do authentication
- fixed isSetup not working for status other than active
- removed ‚Ensure a User is Registered‘ test as this is covered by the
new setup test
2014-07-17 14:22:32 +02:00
Sebastian Gierlinger
42f461cb6d Restored spam prevention
closes #3128
- added spam prevention middleware
- restored tests
2014-07-17 14:22:07 +02:00
Hannah Wolfe
31fa6bef1f Merge pull request #3308 from JohnONolan/newsignup
New signup screen
2014-07-17 13:09:53 +01:00
Hannah Wolfe
823670ee3f Merge pull request #3306 from JohnONolan/fadeinsetup
Fade in the setup form
2014-07-17 13:09:43 +01:00
John O'Nolan
772f2c7a55 Removing erroneous placeholder text from user profile
Reverting the placeholder that was introduced in #2734 to fix #1623. We should handle this intelligently by automatically interpretting the input and using validation if we can't. The user should not have to know or care about what http is.

Regardless off any of the above, we should not be introducing user-facing text like this without proper consideration. A placeholder of "http://ghost.org" is far more confusing than no placeholder at all. It also looks like a cheap promotional tactic on our part.
2014-07-17 14:07:12 +02:00
John O'Nolan
b42577655a Fade in the setup form 2014-07-17 13:39:53 +02:00
John O'Nolan
9e75ec1f5a New signup screen
See #3082 - This borrows setup screen styles for now
2014-07-17 13:34:40 +02:00
Hannah Wolfe
ce06ad412a Adding and renaming permissions
refs #3283, refs #2739, refs #3096

- Renames permissions which didn't follow bread
- Adds permissions for notifications, mail and tags

Still todo:

- wire up the new permissions where they are needed
- add permissions for roles
2014-07-17 12:32:25 +01:00
Hannah Wolfe
d77f61b556 Merge pull request #3307 from TryGhost/revert-3282-issue#3128
Revert "Restore spam prevention"
2014-07-17 12:20:18 +01:00
Hannah Wolfe
5c1a7a7349 Revert "Restore spam prevention" 2014-07-17 12:11:23 +01:00
Hannah Wolfe
7ce22416c6 Merge pull request #3296 from ErisDS/force-migrate
Hacky FORCE_MIGRATION env var
2014-07-16 20:03:03 +01:00
Hannah Wolfe
00e3588656 Merge pull request #3298 from jaswilli/issue-3288
Handle undefined datetime values
2014-07-16 20:02:44 +01:00
Hannah Wolfe
ef8c280635 Merge pull request #3282 from sebgie/issue#3128
Restore spam prevention
2014-07-16 19:39:32 +01:00
Hannah Wolfe
5f5b767b35 Merge pull request #3280 from jaswilli/issue-3145
Prevent loading setup screen if already setup
2014-07-16 19:36:51 +01:00
Hannah Wolfe
eed2ac728c Hacky FORCE_MIGRATION env var
refs #2600

One day in the future it would be nice to have a CLI for Ghost
In the meantime, lets have an easy way to force migrations to run
This is for development, or dead end situations only
It will at least do a DB backup ;)
2014-07-16 19:20:26 +01:00
Jason Williams
422806f028 Handle undefined datetime values
Closes #3288
- Check for undefined last_login and created_at values that occur
  on a User model for an invited user.
2014-07-16 17:12:45 +00:00
Jason Williams
979c3f237c Prevent loading setup screen if already setup
Closes #3145
- Prevent navigation to the setup screen if Ghost setup
  has previously been completed.
- Fix templates that were incorrectly using foreach instead of each.
- Add validation for minimum password length.
- Fix up functional tests and split out tests for setup to a separate
  instance of casper because setup requires a new database.
- Add a cleanDatabase task to grunt which resets the database to
  new.
2014-07-16 15:54:42 +00:00
Sebastian Gierlinger
e4e027d17b Restored spam prevention
closes #3128
- added spam prevention middleware
- restored tests
2014-07-16 10:00:49 +02:00
Hannah Wolfe
5095c6f0dd Merge pull request #3277 from PaulAdamDavis/link-href-fixes
Replace anchors with no real href with buttons
2014-07-15 18:34:50 +01:00
Hannah Wolfe
34a0c42834 Merge pull request #3276 from sebgie/issue#3252
Move image upload to API
2014-07-15 18:09:32 +01:00
Paul Adam Davis
6451be695b Replace anchors with no real href with buttons
Closes #3101 & #916
2014-07-15 17:43:21 +01:00
Hannah Wolfe
0a2c72648d Merge pull request #3270 from ErisDS/migrations
Migration improvements
2014-07-15 17:00:59 +01:00
Hannah Wolfe
5ca558fe06 Merge pull request #3278 from jaswilli/prod-prep
Move inline templates to standalone template file
2014-07-15 17:00:01 +01:00
Hannah Wolfe
4d610268c6 Merge pull request #3259 from novaugust/settings-mobile-routing
Refactor Settings routing and mobile interactions
2014-07-15 16:55:02 +01:00
Hannah Wolfe
d7db69831b Merge pull request #3210 from novaugust/remove-minor-notifications
Remove minor notifications; Close persistent notifications even on error
2014-07-15 16:54:40 +01:00
Jason Williams
b98163c713 Move inline templates to standalone template file
Refs #3161
- Move two inline template snippets from the post tags input
  component into the .hbs template file so they can be
  pre-compiled.  Needed when shipping only the handlebars runtime
  in production mode.
2014-07-15 15:21:44 +00:00
Matt Enlow
58b635203c Remove minor notifications; Close persistent notifications even on error
Closes #3105, Closes #3175

- Removed notification on successful post's `page` status change
- Removed notification on successful post `featured` status change
- Added `closePassive()` notifications on error in the post-settings-menu
- Persistent notifications will close whether their `DELETE` request was
  successful or not.

 #### Misc
- Added `name` attribute to `post-setting-menu.hbs` inputs to facilitate testing
- Removed `return <Promise>` from action in `PostSettingsMenuController`. Actions should only return `true`
- Toggling `post.featured` won't fire NProgress.
2014-07-15 09:03:18 -06:00
Sebastian Gierlinger
2957b0175e Move image upload to API
closes #3252
- added `/ghost/api/v0.1/uploads/` endpoint
- removed upload method from `controller/admin.js`
- moved removal of temporary files from storage to endpoint (needed to
account for failed uploads)
- changed and moved tests
- Oversight: I think that we use `.otherwise()` and `.catch()` a bit
too extensive and mask the real error objects. We probably need an
error handling strategy at some point in the future.
2014-07-15 12:40:14 +02:00
Matt Enlow
153f76aa7c Refactor settings routing and mobile interactions
Closes #3254, closes #3138, closes #3245
 ### Settings Routing and View refactoring
- Refactored `SettingsView` to handle transitions between mobile and desktop layouts
- `SettingsRoute` will only transition to `settings.general` if the screen is large enough to show both the menu and the content
- Added `SettingsIndexView` to handle showing the settings menu on mobile screens
- Added `SettingsContentBaseView` to be inherited by any settings view that is not index.
- Updated Settings templates appropriately to work with new views
- Removed extraneous `active` class from `settings-content`
- Changed settings menu to use `gh-activating-list-item`
- Retooled settings tests

 ### Mobile Utils
- Renamed file to `mobile.js`, since it's inside of `utils/`
- Added `mobileQuery` MediaQueryList to help detect layout changes
- Removed unused `hasTouchScreen`, `device.js` should be used instead.
- Removed unused `smallScreen` function
- Moved FastClickInit to codemirror-mobile
2014-07-14 17:36:48 -06:00
Hannah Wolfe
3ff9146d9e Server side cleanup
- remove sessions
- remove all references to csrf
- create a shared base model for the 2 types of token
2014-07-14 21:50:12 +01:00
Hannah Wolfe
4c6b324494 Merge pull request #3272 from jaswilli/issue-3271
Fix validations on user settings page
2014-07-14 21:12:40 +01:00
Hannah Wolfe
34eb5c84fb Migration improvements
refs #2600

- fixed issue with defaults not being populated on upgrade
- added logging to all actions in the migration process to help debugging
  in future
- did a little bit of refactoring
2014-07-14 21:12:02 +01:00
Jason Williams
ef1858b6c7 Fix validations on user settings page
Closes #3271
- Change validations on both server and client to allow the
  Website field to be empty or a valid URL.
- Add new schema validation helper isEmptyOrURL.
- Remove duplicate call to UserValidator in the save action
  of the SettingsUser controller.
- User.last_login and User.created_at are already Moment objects
  so Moment#fromNow can be called on them directly.
2014-07-14 18:12:57 +00:00
Hannah Wolfe
6cdf9e5999 Merge pull request #3238 from ErisDS/issue-2600
Refactor fixtures & fixture migrations to 003
2014-07-14 17:03:08 +01:00
Hannah Wolfe
16a94ad6e6 Merge pull request #3253 from hswolff/settings-user-tab
Settings: Admin User Tab
2014-07-14 16:00:54 +01:00
Hannah Wolfe
0565027900 Refactoring fixtures
refs #2600, refs #2379

Refactoring fixtures to make permission management a little easier
- Separate fixtures into JSON file and split permissions fixtures from other fixtures
- make fixture migrations more robust by fetching objects, not relying on
  ids and checking before adding
- changed owner fixture slightly to remove any confusion between the 'Owner' role and 'Ghost Owner' user.
- moved 003 fixture versions out of config into logic, possibly not a good
  idea
- refactored permissions fixtures and added permissions_roles fixtures to
  make it easier to read / add
2014-07-14 15:52:47 +01:00
Harry Wolff
4f727ed068 Settings: Admin User Tab
closes #2422

- updated to use new change password method
- have all save settings use notifications
- create assetUrl helper for creating asset paths with subdir's properly
 prefixed
- move all url based helpers onto a url object in ghost-paths
2014-07-14 08:52:06 -04:00
Hannah Wolfe
516fd2680d Upgrading bookshelf to 0.7.6 & knex to 0.6.21 2014-07-14 12:34:06 +01:00
Hannah Wolfe
8c131a61c6 Merge pull request #3268 from PaulAdamDavis/bower-ghost-ui-080
Update Ghost-UI version to ~0.8.0
2014-07-14 12:26:51 +01:00
Hannah Wolfe
d2cac9ed4e Merge pull request #3267 from ErisDS/cache-bower
Add bower to travis cache
2014-07-14 12:26:17 +01:00
Paul Adam Davis
dbc3a0f556 Update Ghost-UI version to ~0.8.0
No issue

- Changes Ghost-UI version to look for any version from 0.8.0 onwards.
2014-07-14 11:19:03 +01:00
Hannah Wolfe
e20c773e5d Merge pull request #3260 from sebgie/invited-pending
Add status invited-pending for users
2014-07-14 11:14:13 +01:00
Hannah Wolfe
ad6f261cd5 Merge pull request #3212 from novaugust/nprogress-save
Fire NProgress on User, Post, and Settings save
2014-07-14 10:50:58 +01:00