Commit Graph

132 Commits

Author SHA1 Message Date
shindakun
5d7630607b Transition to signin with error message on invalid token not 500 error screen
closes #3548
- Add error to hidenav, removes menubar from error screen.
- Wrap atob() in a try/catch
- Added regex to try and validate if params.token at least looks like base64
2014-08-06 08:08:02 -07:00
Jason Williams
b4c3c6f20a Check for server notifications on hard refresh
Closes #3612
- Trigger the loadServerNotifications event from the
  ApplicationRoute's afterModel hook, which gets called
  every time the app gets loaded.
2014-08-06 05:01:00 +00:00
Jason Williams
3242c5b4a9 Cleanup from notifications refactor.
Refs #3521
2014-08-06 00:13:56 +00:00
Maurice Williams
bac71559f3 prevent revoking invite for already active users
closes #3563
- before attempting to revoke an invitation, get updated model info
- reload route and show warning if user info has changed
2014-08-05 00:35:46 -04:00
Hannah Wolfe
05ce783bd5 Merge pull request #3535 from rwjblue/properly-transition-on-mobile
Handle toggleing the content screen on mobile.
2014-08-03 17:23:25 +01:00
Robert Jackson
43c68f0bf9 Ensure keyboard navigation matches custom post sorting. 2014-08-02 10:39:26 -04:00
Jason Williams
1c6216777c Refactor notifications to prevent stacking.
Closes #3511, Closes #3512, Closes #3526
- show* methods now close existing passive notifications by
  default.  They also now take an optional options object where
  existing parameters such as "delayed" and "defaultErrorText"
  can be passed in as well as the new "doNotClosePassive" flag.
- Removed all explicit calls to notifications.closePassive except
  for the few places where it makes sense to call it separately.
2014-08-01 16:57:29 +00:00
Robert Jackson
9912c2bfed Handle toggleing the content screen on mobile.
Closes #3520.

Move the custom jQuery animation into an action on the controller so
that we can trigger it from within the route if needed.
2014-08-01 02:47:29 -04:00
Hannah Wolfe
68610d579f Merge pull request #3496 from jaswilli/refresh
Remove unnecessary hard refresh on signout.
2014-08-01 00:04:39 +01:00
Jason Williams
b1c75ce324 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
be922d5d06 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
369eaa454e 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
e34ecada69 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
34dbc13893 Merge pull request #3477 from halfdan/duplicate-notification
Avoids duplicate notification / transition
2014-07-31 15:47:19 +01:00
Fabian Becker
1fffc74247 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
774d027ffb Redirect to the first available post for current user. 2014-07-31 12:44:22 +01:00
Hannah Wolfe
74549ddc59 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
68fe9fabef 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
92ccdf7024 Post list: authors see their own posts
issue #3446
2014-07-31 09:02:48 +01:00
Matt Enlow
e3a5608108 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
356f9525d8 Redirect to error404 when user not found.
Closes #3459.
2014-07-30 17:43:45 -04:00
Hannah Wolfe
820459e625 Merge pull request #3463 from rwjblue/hard-refresh
Perform a hard refresh upon signout.
2014-07-30 22:28:27 +01:00
Robert Jackson
7abbcf18e4 Perform a hard refresh upon signout.
Closes #3458.
2014-07-30 14:22:28 -04:00
Fabian Becker
a22f1d0d7a Properly remove email notification on signout.
no ref
- Calls notifications.clear() on signout
2014-07-30 13:32:19 +00:00
Hannah Wolfe
11c0fe7a0f Merge pull request #3416 from alarobric/case_3291
Settings screens redirect for certain roles
2014-07-30 14:17:19 +01:00
Alan Richards
4d074c3e55 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
d19c3ae9d1 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
fe9692e824 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
4972fe1672 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
371a4a059f 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
0d4397ef98 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
7835d824d3 updated Ember Simple Auth to latest version 2014-07-25 16:04:19 +02:00
Hannah Wolfe
c057d0b406 Merge pull request #3385 from felixrieseberg/iss3375
Signin error notifications kept from stacking
2014-07-25 08:48:08 +01:00
Hannah Wolfe
f3899aaefe 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
8d3a3e711f 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
5e021da86c 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
ed0ac32ebb 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
20f473cb88 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
13f14a5f61 Merge pull request #3346 from jaswilli/issue-3325
Extend adapter to support automatic includes
2014-07-21 20:38:57 +01:00
Maurice Williams
fb170d1725 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
0bfe99af72 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
95d3925c3e Merge pull request #3345 from novaugust/model-relationships
Add relationships to client models
2014-07-21 16:17:43 +01:00
Matt Enlow
b9e755f142 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
9ad9e6e645 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
1181c18f20 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
25ff26016e 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
14f29f5139 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
1089cdb036 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
51ed2868f7 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
aceb63c973 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