Ghost/ghost/admin/tests/acceptance
Kevin Ansfield 683a8584ce Refactored away CurrentUserSettings mixin (#2200)
no issue

Mixins are deprecated in Ember so we want to remove their usage. The `CurrentUserSettings` mixin was used in Route files to provide `transitionAuthor()` (that also transitions contributors) and `transitionEditor()` methods so the the consuming route could use them to prevent access to authors/editors. In practice the only reason this was used was to prevent access to admin-only routes.

- added an `AdminRoute` class that inherits from our `AuthenticatedRoute` class
  - when any route inherits from this class it will only allow access to admins and owners, any other user will be redirected to the home screen (dashboard or site depending on permissions)
- updated all of our admin-only routes to use the new `AdminRoute`
  - allowed for removal of `CurrentUserSettings` mixin usage
  - allowed for `beforeModel()` hooks to be removed from consuming routes in many cases
  - some admin-only routes were extending/inheriting directly from Ember's `Route` based on the assumption that the router hierarchy would have a parent route perform the redirect. Those have also been switched to `AdminRoute` for consistency and to prevent accidentally making them available if the router hierarchy changes
  - `/#/settings` does not use the `AdminRoute` so that it can redirect to the current user's setting page for non-admin users
- removed `CurrentUserSettings` mixin file
- cleaned up unnecessary computed property and function used for redirect-when-disabled in the Zapier route
2022-01-17 10:05:27 +00:00
..
settings Refactored away CurrentUserSettings mixin (#2200) 2022-01-17 10:05:27 +00:00
authentication-test.js Fixed staff tests 2021-11-04 09:40:24 +01:00
content-test.js Bumped eslint-plugin-ghost and fixed linter errors 2021-07-15 15:27:29 +01:00
custom-post-templates-test.js Updated for breaking changes in ember-cli-mirage@1.0.0 2019-05-27 09:58:33 +01:00
dashboard-test.js Added blank dashboard screen 2021-02-02 16:08:00 +00:00
editor-test.js Fixed editor test failing when run within 10mins of midday 2022-01-06 13:02:43 +00:00
error-handling-test.js Cleaned up customThemeSettings feature flag 2022-01-03 14:09:27 +00:00
launch-flow-test.js Fixed unauthed access to launch wizard and updated test to use Owner user 2021-02-04 17:45:16 +00:00
members-test.js Fixed ?search= empty param after members bulk delete 2022-01-05 12:52:12 +00:00
offers-test.js Removed Offers related usage of labs flag (#2134) 2021-11-03 16:55:45 +02:00
password-reset-test.js Updated for breaking changes in ember-cli-mirage@1.0.0 2019-05-27 09:58:33 +01:00
setup-test.js Fixed tests 2021-02-24 15:56:18 +00:00
signin-test.js Using accent color on login button 2021-03-03 13:36:44 +01:00
signup-test.js Fixed tests 2021-02-24 15:56:18 +00:00
staff-test.js Fixed staff tests 2021-11-04 09:40:24 +01:00