mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
683a8584ce
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 |
||
---|---|---|
.. | ||
.github | ||
app | ||
config | ||
lib | ||
mirage | ||
public/assets | ||
tests | ||
.csscomb.json | ||
.editorconfig | ||
.ember-cli | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.watchmanconfig | ||
ember-cli-build.js | ||
ember-cli-update.json | ||
Gruntfile.js | ||
LICENSE | ||
package.json | ||
README.md | ||
renovate.json | ||
SECURITY.md | ||
testem.js | ||
yarn.lock |
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.