Merge pull request #3172 from sebgie/issue#3145

Redirect setup if authenticated
Merge pull request #3173 from ErisDS/issue-3171

Improve ember casper test stability
Merge pull request #3149 from kevinansfield/persistent-notifications

Persistent notifications
Signin Validation

closes #3120
- create `validateAndAuthenticate` action to validate, send `authenticate` action on success, notifications on error
- signin template uses `validateAndAuthenticate` action instead of `authenticate` action
References #33

- Alter the existing UI
- Add 2 button options, 'has-icon' and 'only-has-icon' (for the < Users and Settings buttons)

Corresponding markup: https://github.com/TryGhost/Ghost/pull/3176/files
Merge pull request #3159 from darvelo/signin-validation

Signin Validation
New edit user UI
Hover colour for the markdown help button when an inactive tab on the tabbed editor.

Previously, hovering the markdown help button when the editor is on mobile tab mode, it disappeared as it was the same colour as the background. It's now the same colour as the inactive tab text.
Prevent stacking notifications during rapid toggle

No issue
-Call notifications.closePassive after the resolution of the
 promise that generates the notifications. Otherwise multiple
 promises can stack up after notifications have been cleared,
 which results in a bunch of stacked notifications.
-Remove some unnecessary propagation of rejected promises from
 action handlers that can result in unhandled reject errors.
Fix up route parameter validation

Closes #3169
-Replace javascript methods that are not available on all
 supported browsers with lodash methods.
-Add returns to transitionTo calls in cases where the model
 hook should stop executing immediately.
Invite user API

closes #3080
- added users.invite() to add user from email with random password
- added `GET /ghost/api/v0.1/users/` to invite users and resend
invitations
- removed one user limit
- added global utils for uid generation
- changed some „“ to ‚‘
Fix direct access to settings/user

closes #3162
- removes injection of user object in application route's beforeModel
- removes injection/cleanup of user object in signedIn/signedOut actions
- removes loading of user and passing to signedIn action in signup/setup controllers
- adds 'user' property to session object
- updates header nav to reference session.user
- sets model of settings/user route to session.user and forces reload
- on leaving settings/user, rollback any unsaved changes
Merge pull request #3176 from PaulAdamDavis/2422-edit-user-ui

New edit user UI
Merge pull request #3181 from jaswilli/ember-misc

Prevent stacking notifications during rapid toggle
Merge pull request #3184 from jaswilli/issue-3169

Fix up route parameter validation
Merge pull request #3185 from sebgie/issue#3080

Invite user API
PostSettingsMenu: Don't save new posts, reset values on failure

Closes #3158, Closes #3143, Closes #3134
- Added `model.rollback()` when PSM fails to save.
- Added `showErrors` and `showSuccess` helper functions to PSM to abstract
  closing and showing of notifications.
- Added `togglePage` action to indirect the setting of `page`.
- Removed `isStaticPage` property in favor of `togglePage` action
- moved `updateSlug` error catching to outer promise (slugGenerator promise)
- modifying the `page` and `published_at` properties will no longer cause a new post to save
- Close passive notifications on published date parse fail
- Removed promise creation in catch statements

- Changed tests to click on label, rather than the input for
  .post-setting-static-page.
Merge pull request #3180 from novaugust/psm-reset-on-error

PostSettingsMenu: Don't save new posts, reset values on failure
Merge pull request #3174 from kevinansfield/session-user

Fix direct access to settings/user using session.user CP
Fix server-side validation

Closes #3122
-Fix validation so that all values are validated instead
 of just values that evaluate to true.
-Ensure validation methods consistently return promises
 and switch error handling from try/catch to promise.catch
 to get rid of unhandled rejection warnings.
-Add 0 and 1 to list of acceptable values in boolean validation.