Ghost/ghost/admin
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
..
.github Added support for Node 16 2021-10-27 10:46:00 +01:00
app Refactored away CurrentUserSettings mixin (#2200) 2022-01-17 10:05:27 +00:00
config Fixed ember-keyboard propagation deprecation notice 2022-01-04 09:31:40 +00:00
lib Cleaned up headerCard labs flag 2022-01-04 14:58:19 +00:00
mirage Fixed linter error 2021-11-01 18:40:47 +00:00
public/assets Changed Apple touch icon to the new Ghost logo 2022-01-11 12:47:50 +01:00
tests Refactored away CurrentUserSettings mixin (#2200) 2022-01-17 10:05:27 +00:00
.csscomb.json Unsplash integration 2017-08-15 16:01:12 +01:00
.editorconfig deps: ember-cli@2.8.0 2016-10-07 17:32:30 +01:00
.ember-cli Co-located component template files 2020-05-18 13:14:08 +01:00
.eslintignore Bumped ember core dependencies to 3.5.x 2019-03-06 07:39:51 +00:00
.eslintrc.js Update dependency eslint-plugin-ghost to v2.0.0 2020-10-23 09:59:09 +01:00
.gitignore Updated gitignore to exclude IDE files 2021-06-09 15:42:13 +05:30
.watchmanconfig deps: ember-cli@1.13.13 2015-11-30 11:21:39 -06:00
ember-cli-build.js Initial ember-promise-modals implementation 2021-09-13 13:01:12 +01:00
ember-cli-update.json Updated core files to match ember-cli new output 2020-08-03 09:24:58 +01:00
Gruntfile.js Bower => NPM (#972) 2018-03-19 17:56:09 +00:00
LICENSE 2022 2022-01-05 12:41:56 +00:00
package.json Update dependency @tryghost/members-csv to v1.2.2 (#2194) 2022-01-17 09:46:15 +00:00
README.md 2022 2022-01-05 12:41:56 +00:00
renovate.json Added faker to ignored deps in Renovate config 2022-01-06 10:59:24 +00:00
SECURITY.md Updated links to ghost.org sites 2021-01-19 13:18:59 +13:00
testem.js Increased testem's browser_start_timeout to 120s 2020-07-20 12:20:26 +01:00
yarn.lock Update dependency @tryghost/members-csv to v1.2.2 (#2194) 2022-01-17 09:46:15 +00:00

Ghost-Admin

This is the home of Ember.js based admin client that ships with Ghost.

Do you want to set up a Ghost blog? Check the getting started guide

Do you want to modify or contribute to Ghost-Admin? Please read how to install from source and swing by our forum if you need any help 😄

Have a bug or issue?

Bugs and issues (even if they only affect the admin client) should be opened on the core Ghost repository.

Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.