Commit Graph

124 Commits

Author SHA1 Message Date
Hannah Wolfe
fa4cb9c19d Merge pull request #3496 from jaswilli/refresh
Remove unnecessary hard refresh on signout.
2014-08-01 00:04:39 +01:00
Jason Williams
68775b3ef8 Remove unnecessary hard refresh on signout.
Refs #3488
- Hard refresh handled by ember-simple-auth.
2014-07-31 22:41:35 +00:00
Hannah Wolfe
de46cd4a14 Merge pull request #3488 from manuelmitasch/fix-session-invalidation
The page refresh when oauth token has expired was broken.
2014-07-31 23:28:58 +01:00
Robert Jackson
7ca51764d6
Show posts authored by current user.
The current logic allows showing of all EXCEPT the current users posts
(when the current user is an author).

This fixes that.
2014-07-31 17:23:08 -04:00
Manuel Mitasch
2b1720e43b The page refresh when oauth token has expired was broken.
Ember simple-auth action "sessionInvalidationSucceeded" was overriden to display a meaningless message.
2014-07-31 21:49:29 +02:00
Hannah Wolfe
45b4b95b1d Merge pull request #3477 from halfdan/duplicate-notification
Avoids duplicate notification / transition
2014-07-31 15:47:19 +01:00
Fabian Becker
b26e0ec669 Avoids duplicate notification / transition
no ref
- Let application.js handle transition after setup
- Remove duplicate loading of server notifications
2014-07-31 14:22:37 +02:00
Robert Jackson
93e728bba2 Redirect to the first available post for current user. 2014-07-31 12:44:22 +01:00
Hannah Wolfe
23b2ac07d8 Completed post & user list filer by role
closes #3446, closes #3086

- Authors can only ever get to their own posts
- Editors only ever see authors in the user list
2014-07-31 11:23:37 +01:00
Robert Jackson
f02c2acd71 Limit Posts for Authors.
* Ensures that posts listing only shows posts that the current user
  authored, if they only have the Author role.
* Do not transition into the posts.post route if the current user is
  not the author (but has the Author role). This is needed because
  the API server will always return the post (regardless of the current
  user).
2014-07-31 09:02:49 +01:00
Hannah Wolfe
7919c15e56 Post list: authors see their own posts
issue #3446
2014-07-31 09:02:48 +01:00
Matt Enlow
420500ffab Add keyboard navigation of posts
Closes #3015
- Added stepThroughPosts method to PostsRouter, takes a integer, goes that far, wraps around the array.
- PostsPostRoute notifies the PostsController of which model it currently has, to help stepThroughPosts know who's selected
2014-07-30 22:23:02 -06:00
Robert Jackson
3bddb548a5
Redirect to error404 when user not found.
Closes #3459.
2014-07-30 17:43:45 -04:00
Hannah Wolfe
c3308fbe2d Merge pull request #3463 from rwjblue/hard-refresh
Perform a hard refresh upon signout.
2014-07-30 22:28:27 +01:00
Robert Jackson
7357ece639
Perform a hard refresh upon signout.
Closes #3458.
2014-07-30 14:22:28 -04:00
Fabian Becker
5bc1bf8380 Properly remove email notification on signout.
no ref
- Calls notifications.clear() on signout
2014-07-30 13:32:19 +00:00
Hannah Wolfe
fe2e3f45c7 Merge pull request #3416 from alarobric/case_3291
Settings screens redirect for certain roles
2014-07-30 14:17:19 +01:00
Alan Richards
dacd1060ee Settings screens redirect for certain roles
Closes #3291
- Adds redirects based on roles as defined in the case
- Adds new mixin `CurrentUserSettings`
- For authors, all settings pages redirect to `users/self`
- For editors, all settings pages other than specific users redirect to `users`. Any user that is not self or an author redirects to `users`
2014-07-30 00:57:16 -07:00
Jason Williams
725d4aac7d Fixup signin and signout
No Issue
- Move authentication related handlers to the Application route.
- Switch Sign Out from a button to a link.  Use the signout route
  to handle invalidating the session and redirecting instead of
  an action from a button.
- Clear error messages on signin page when pressing log in button.
- Errors are now always shown on sign in screen and a success
  notification is shown after sign out.
- Update functional tests.
2014-07-29 20:58:43 +00:00
Sebastian Gierlinger
b3112a4349 Reset/Signin while signed in
no issue
- added redirect and notification to reset route
- added notification to signup route
2014-07-28 18:00:08 +02:00
Hannah Wolfe
f372ecddf0 Merge pull request #3411 from novaugust/signup-password
Rebind password to password input on signup page
2014-07-27 19:36:54 +01:00
Jason Williams
9dfef70d25 Do not clear password until after leaving signin
Closes #3399
- Provide our own authenticate action handler which does not
  clear the password input.
- Use the Signin route's deactivate hook to clear the password
  property on the controller after the user has transitioned
  away from the signin page.
2014-07-26 19:06:58 +00:00
Matt Enlow
698f5f6f6e Rebind name and password to inputs on signup page
Closes #3410, Ref #3392
- Removed setting name from user email address per issue #3392
2014-07-25 13:04:33 -06:00
Marco Otte-Witte
6406acef5c updated Ember Simple Auth to latest version 2014-07-25 16:04:19 +02:00
Hannah Wolfe
cc67f295ef Merge pull request #3385 from felixrieseberg/iss3375
Signin error notifications kept from stacking
2014-07-25 08:48:08 +01:00
Hannah Wolfe
81cd617741 Merge pull request #3376 from felixrieseberg/iss3292
Redirect authors and editors away from debug page
2014-07-24 17:51:16 +01:00
Felix Rieseberg
61cf8690dd Signin error notifications kept from stacking
closes #3375
- Prior to showing error notifications, the signin route now calls
  closePassive().
2014-07-24 11:16:00 -04:00
Jason Williams
8a2d50b871 Improve handling of users and roles in admin
Closes #3083 Refs #3229
- Populates the dropdown list in the invite user menu with the
  list of roles a user is permitted to create.
- Users API now checks the invite user request for allowed roles.
- Change API response from 200 to 201 on successful invitation.
- Change API response from 500 to 201 when the user was created but
  the email was not sent.  The client will show a warning notification
  when it sees 'invite-pending' as the new user's status.
- Add support for "?status=all" to the /users endpoint.
- Refactor the route and controller for the /settings/users page so
  that there's only one network API call to load users instead of two.
2014-07-24 14:20:47 +00:00
Felix Rieseberg
dbcb827772 Redirect authors and editors away from debug page
A signed in user with role author or editor will be redirected back to
/ghost.

closes #3292
2014-07-23 17:25:13 -04:00
Jason Williams
1c356f59b2 Only load posts once on navigating to content tab
No Issue
- Loading posts from the API should not be necessary in PostsIndexRoute
  because its parent resource (PostsRoute) pre-loads the store.
  Changing the store.find to store.all gets rid of a duplicate
  network request to load all posts.
2014-07-21 19:44:03 +00:00
Hannah Wolfe
1caa5bd6e0 Merge pull request #3346 from jaswilli/issue-3325
Extend adapter to support automatic includes
2014-07-21 20:38:57 +01:00
Maurice Williams
a8ca517c54 Pagination for Users Management screen
closes #3222
- implementing server-side pagination for /users API
- passing /users?limit=none will return all users
- passing /users?status=invited will filter base on user status
- creating 3 mixins (route, controller and view) to keep pagination logic DRY
- updating route, controller and view for Posts to use new mixing
- implementing infinite scrolling for Users Management screen (using new mixins)
- Users Management screen displays all invited users, but paginates active users
2014-07-21 14:03:26 -04:00
Jason Williams
2e67d6bf99 Extend adapter to support automatic includes
Closes #3325
- Add Roles model and add hasMany roles to User model.
- Add EmbeddedRelationAdapter that will automatically include
  hasMany relations in calls to the API.
- UserAdapter and PostAdapter now extend EmbeddedRelationAdapter
  and all explicit includes from store.find() have been removed.
2014-07-21 17:05:13 +00:00
Hannah Wolfe
29800356de Merge pull request #3345 from novaugust/model-relationships
Add relationships to client models
2014-07-21 16:17:43 +01:00
Matt Enlow
3667fa9885 Add relationships to client models
No issue
- Removed tabs from tag.js (why didn't jshint catch this?)
- Removed superfluous `activate` in SettingsIndexRoute
- updated `UserModel` and `TagModel` to have `created_by, updated_by` be references to `user` objects.
- updated `UserModel` to use `moment-date` instead of `date`
2014-07-21 08:01:59 -06:00
Matt Enlow
ad3ff49bea Add Author dropdown to PostSettingsMenu
Ref #3084
This PR does NOT hide the dropdown as required to close 3084.

- `EditorNewRoute` creates post with the author set to the current user
- added `authors` ArrayPromiseProxy (whoa, what?) to PSM
- added `changeAuthor` function that sets author and saves model when the user selects a new author
2014-07-18 17:29:46 -06: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
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
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
Matt Enlow
77941275ed Fix mobile sidebar menu
Closes #3110
- Created `ApplicationView`
- Added `js-close-sidebar` classes to navbar navigation links
- Clicking on a navigation link in the sidebar will close it
2014-07-07 08:55:22 -06:00
Maurice Williams
ad9997e995 Removing old "user settings" screen and putting in new MU "users settings" screen and updating functional test cases.
Fixes #3078
- new "users" resource, with matching controller and template
- fetching real data from /ghost/api/v0.1/users/
- updated "user" route to accept a :slug as a URL parameter
- updated labels everywhere (from "user" to "users")
- updated "profile" link to header to point to proper "users/:slug" route
- updated core/client/.jshintrc to recognize moment as a valid global function
- adjusted DOM selector used in Casper to properly identify the new screen
- adding "slug" as a new property of the user data used during the Casper functional tests
2014-07-05 11:33:03 -04:00
Sebastian Gierlinger
84cfd529ed Allow user to accept invitation
closes #3081
- added route `/ghost/api/v0.1/authentication/invitation`
- added accept invitation
- added signup with token
- removed check() from users api
- fixed promise in resetPassword()
2014-07-03 17:06:07 +02:00
Hannah Wolfe
f114f4f2f6 Merge pull request #3174 from kevinansfield/session-user
Fix direct access to settings/user using session.user CP
2014-07-03 08:44:03 +01:00
Kevin Ansfield
7bfe6e9db7 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
2014-07-02 17:45:21 +02:00
Jason Williams
e54eb677e9 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.
2014-07-02 14:13:07 +00:00
Hannah Wolfe
087c483498 Merge pull request #3149 from kevinansfield/persistent-notifications
Persistent notifications
2014-07-01 14:23:38 +01:00
Hannah Wolfe
0beb36d387 Merge pull request #3172 from sebgie/issue#3145
Redirect setup if authenticated
2014-07-01 13:57:56 +01:00
Sebastian Gierlinger
b332e8c158 Redirect setup if authenticated
closes #3145
- added beforeModel redirect
- added test
2014-07-01 12:57:44 +02:00
Kevin Ansfield
7e2e8b3376 Persistent notifications
closes #3057
- add Notification model
- update injected Notifications object to handle persistent notifications
- load server notifications on setup if logged in otherwise on successful sign-in
- changed all existing notifications.closeAll calls to closePassive
- fixed dismissable/dismissible spelling in server API & tests
- add notifications.closeNotification method so DELETE calls can be made for server-originating notifications
2014-07-01 11:36:21 +02:00
Sebastian Gierlinger
ace2cc1673 Redirect signin if authenticated
closes #3147
- added beforeModel redirect
- added test
2014-07-01 11:21:05 +02:00