mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
deps: ember-simple-auth@1.2.0
This commit is contained in:
parent
9ddd4681f7
commit
fbc99e6fa7
@ -22,6 +22,8 @@ shortcuts[`${ctrlOrCmd}+s`] = {action: 'save', scope: 'all'};
|
||||
export default Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
|
||||
shortcuts,
|
||||
|
||||
routeAfterAuthentication: 'posts',
|
||||
|
||||
config: injectService(),
|
||||
feature: injectService(),
|
||||
dropdown: injectService(),
|
||||
|
@ -1,4 +1,6 @@
|
||||
import Route from 'ember-route';
|
||||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Route.extend(AuthenticatedRouteMixin);
|
||||
export default Route.extend(AuthenticatedRouteMixin, {
|
||||
authenticationRoute: 'signin'
|
||||
});
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Route from 'ember-route';
|
||||
import injectService from 'ember-service/inject';
|
||||
import Configuration from 'ember-simple-auth/configuration';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
|
||||
export default Route.extend(styleBody, {
|
||||
@ -21,7 +20,7 @@ export default Route.extend(styleBody, {
|
||||
// with OAuth auth users are authenticated on step 2 so we
|
||||
// can't use the session.isAuthenticated shortcut
|
||||
if (!this.get('config.ghostOAuth') && this.get('session.isAuthenticated')) {
|
||||
this.transitionTo(Configuration.routeIfAlreadyAuthenticated);
|
||||
this.transitionTo('posts');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2,15 +2,15 @@ import Route from 'ember-route';
|
||||
import injectService from 'ember-service/inject';
|
||||
import EmberObject from 'ember-object';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import Configuration from 'ember-simple-auth/configuration';
|
||||
import DS from 'ember-data';
|
||||
import {
|
||||
isVersionMismatchError
|
||||
} from 'ghost-admin/services/ajax';
|
||||
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
|
||||
|
||||
const {Errors} = DS;
|
||||
|
||||
export default Route.extend(styleBody, {
|
||||
export default Route.extend(UnauthenticatedRouteMixin, styleBody, {
|
||||
titleToken: 'Sign In',
|
||||
|
||||
classNames: ['ghost-login'],
|
||||
@ -18,13 +18,7 @@ export default Route.extend(styleBody, {
|
||||
session: injectService(),
|
||||
notifications: injectService(),
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.get('session.isAuthenticated')) {
|
||||
this.transitionTo(Configuration.routeIfAlreadyAuthenticated);
|
||||
}
|
||||
},
|
||||
routeIfAlreadyAuthenticated: 'posts',
|
||||
|
||||
model() {
|
||||
return EmberObject.create({
|
||||
|
@ -31,9 +31,7 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
'ember-simple-auth': {
|
||||
authenticationRoute: 'signin',
|
||||
routeAfterAuthentication: 'posts',
|
||||
routeIfAlreadyAuthenticated: 'posts'
|
||||
|
||||
},
|
||||
|
||||
torii: {
|
||||
|
@ -74,7 +74,7 @@
|
||||
"ember-power-select": "1.4.3",
|
||||
"ember-resolver": "2.1.1",
|
||||
"ember-route-action-helper": "2.0.2",
|
||||
"ember-simple-auth": "1.1.0",
|
||||
"ember-simple-auth": "1.2.0",
|
||||
"ember-sinon": "0.6.0",
|
||||
"ember-sortable": "1.9.1",
|
||||
"ember-source": "2.11.0",
|
||||
|
@ -734,7 +734,7 @@ broccoli-file-creator@^1.0.0, broccoli-file-creator@^1.1.1:
|
||||
rsvp "~3.0.6"
|
||||
symlink-or-copy "^1.0.1"
|
||||
|
||||
broccoli-filter@^0.1.6:
|
||||
broccoli-filter@^0.1.11, broccoli-filter@^0.1.6:
|
||||
version "0.1.14"
|
||||
resolved "https://registry.yarnpkg.com/broccoli-filter/-/broccoli-filter-0.1.14.tgz#23cae3891ff9ebb7b4d7db00c6dcf03535daf7ad"
|
||||
dependencies:
|
||||
@ -938,7 +938,7 @@ broccoli-sri-hash@^2.1.0:
|
||||
sri-toolbox "^0.2.0"
|
||||
symlink-or-copy "^1.0.1"
|
||||
|
||||
broccoli-stew@^1.2.0, broccoli-stew@^1.3.3:
|
||||
broccoli-stew@^1.0.4, broccoli-stew@^1.2.0, broccoli-stew@^1.3.3:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/broccoli-stew/-/broccoli-stew-1.4.0.tgz#1bdb0a1804d62a419d190abc26acb3c91878154d"
|
||||
dependencies:
|
||||
@ -961,6 +961,14 @@ broccoli-string-replace@^0.1.1:
|
||||
broccoli-persistent-filter "^1.1.5"
|
||||
minimatch "^2.0.8"
|
||||
|
||||
broccoli-templater@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/broccoli-templater/-/broccoli-templater-1.0.0.tgz#7c054aacf596d1868d1a44291f9ec7b907d30ecf"
|
||||
dependencies:
|
||||
broccoli-filter "^0.1.11"
|
||||
broccoli-stew "^1.2.0"
|
||||
lodash.template "^3.3.2"
|
||||
|
||||
broccoli-uglify-js@0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/broccoli-uglify-js/-/broccoli-uglify-js-0.2.0.tgz#3701901c8eafbb48d58936a45a8592749003a1c8"
|
||||
@ -1324,7 +1332,7 @@ commander@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.0.0.tgz#d1b86f901f8b64bd941bdeadaf924530393be928"
|
||||
|
||||
commander@2.3.0:
|
||||
commander@2.3.0, commander@^2.1.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873"
|
||||
|
||||
@ -1334,7 +1342,7 @@ commander@2.8.x:
|
||||
dependencies:
|
||||
graceful-readlink ">= 1.0.0"
|
||||
|
||||
commander@^2.1.0, commander@^2.5.0, commander@^2.6.0, commander@^2.9.0:
|
||||
commander@^2.5.0, commander@^2.6.0, commander@^2.9.0:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||
dependencies:
|
||||
@ -2198,6 +2206,13 @@ ember-concurrency@0.7.19, ember-concurrency@^0.7.15:
|
||||
ember-getowner-polyfill "^1.1.0"
|
||||
ember-maybe-import-regenerator "^0.1.4"
|
||||
|
||||
ember-cookies@^0.0.11:
|
||||
version "0.0.11"
|
||||
resolved "https://registry.yarnpkg.com/ember-cookies/-/ember-cookies-0.0.11.tgz#6f6a070255e943d26fa5f332921a2bbca04d5a07"
|
||||
dependencies:
|
||||
ember-cli-babel "^5.1.6"
|
||||
ember-getowner-polyfill "~1.1.1"
|
||||
|
||||
ember-data-filter@1.13.0:
|
||||
version "1.13.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-data-filter/-/ember-data-filter-1.13.0.tgz#54f9d54706d8ff61e9f0522660c86ec8de34def1"
|
||||
@ -2275,19 +2290,13 @@ ember-get-helper@~1.1.0:
|
||||
ember-cli-babel "^5.1.6"
|
||||
ember-cli-version-checker "^1.1.3"
|
||||
|
||||
ember-getowner-polyfill@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-getowner-polyfill/-/ember-getowner-polyfill-1.0.0.tgz#f847ceabd97ab97e9e9d279c382400a4d407a9d6"
|
||||
dependencies:
|
||||
ember-cli-babel "^5.1.5"
|
||||
|
||||
ember-getowner-polyfill@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ember-getowner-polyfill/-/ember-getowner-polyfill-1.0.1.tgz#f60a31d25d642461dac4b4746184afaf7f5084ae"
|
||||
dependencies:
|
||||
ember-cli-babel "^5.1.5"
|
||||
|
||||
ember-getowner-polyfill@1.1.1:
|
||||
ember-getowner-polyfill@1.1.1, ember-getowner-polyfill@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ember-getowner-polyfill/-/ember-getowner-polyfill-1.1.1.tgz#6bb6603827dd2f8f33be2434570a86cc9e5273ff"
|
||||
dependencies:
|
||||
@ -2405,6 +2414,18 @@ ember-myth@0.1.1:
|
||||
myth "^1.4.0"
|
||||
rsvp "^3.0.18"
|
||||
|
||||
ember-network@^0.3.0:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/ember-network/-/ember-network-0.3.1.tgz#4187988fc817d194a722039806518409d2dd72ab"
|
||||
dependencies:
|
||||
broccoli-funnel "^1.0.1"
|
||||
broccoli-merge-trees "^1.0.0"
|
||||
broccoli-stew "^1.0.4"
|
||||
broccoli-templater "^1.0.0"
|
||||
ember-cli-babel "^5.1.5"
|
||||
node-fetch "^1.3.3"
|
||||
whatwg-fetch "^0.11.0"
|
||||
|
||||
ember-new-computed@^1.0.0, ember-new-computed@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/ember-new-computed/-/ember-new-computed-1.0.3.tgz#592af8a778e0260ce7e812687c3aedface1622bf"
|
||||
@ -2470,13 +2491,16 @@ ember-scrollable@^0.4.0:
|
||||
ember-element-resize-detector "0.1.5"
|
||||
ember-lifeline "1.0.0"
|
||||
|
||||
ember-simple-auth@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz#7a6162e1b58b88c4b535e4476be6033be233b2b6"
|
||||
ember-simple-auth@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ember-simple-auth/-/ember-simple-auth-1.2.0.tgz#6275c1580ab17aad303d51723515f3b933fb4635"
|
||||
dependencies:
|
||||
ember-cli-babel "^5.1.5"
|
||||
ember-cli-babel "^5.1.7"
|
||||
ember-cli-import-polyfill "^0.2.0"
|
||||
ember-cli-is-package-missing "^1.0.0"
|
||||
ember-getowner-polyfill "1.0.0"
|
||||
ember-cookies "^0.0.11"
|
||||
ember-getowner-polyfill "^1.1.0"
|
||||
ember-network "^0.3.0"
|
||||
silent-error "^1.0.0"
|
||||
|
||||
ember-sinon@0.6.0:
|
||||
@ -4330,6 +4354,10 @@ lodash._baseindexof@*:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
|
||||
|
||||
lodash._basetostring@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
|
||||
|
||||
lodash._baseuniq@~4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
|
||||
@ -4337,6 +4365,10 @@ lodash._baseuniq@~4.6.0:
|
||||
lodash._createset "~4.0.0"
|
||||
lodash._root "~3.0.0"
|
||||
|
||||
lodash._basevalues@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
|
||||
|
||||
lodash._bindcallback@*, lodash._bindcallback@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
|
||||
@ -4371,11 +4403,11 @@ lodash._isiterateecall@^3.0.0:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
|
||||
|
||||
lodash._reinterpolate@~3.0.0:
|
||||
lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
|
||||
|
||||
lodash._root@~3.0.0:
|
||||
lodash._root@^3.0.0, lodash._root@~3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
|
||||
|
||||
@ -4419,6 +4451,12 @@ lodash.defaults@^3.1.1:
|
||||
lodash.assign "^3.0.0"
|
||||
lodash.restparam "^3.0.0"
|
||||
|
||||
lodash.escape@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
|
||||
dependencies:
|
||||
lodash._root "^3.0.0"
|
||||
|
||||
lodash.find@^4.5.1:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1"
|
||||
@ -4493,6 +4531,20 @@ lodash.restparam@*, lodash.restparam@^3.0.0:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
|
||||
|
||||
lodash.template@^3.3.2:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
|
||||
dependencies:
|
||||
lodash._basecopy "^3.0.0"
|
||||
lodash._basetostring "^3.0.0"
|
||||
lodash._basevalues "^3.0.0"
|
||||
lodash._isiterateecall "^3.0.0"
|
||||
lodash._reinterpolate "^3.0.0"
|
||||
lodash.escape "^3.0.0"
|
||||
lodash.keys "^3.0.0"
|
||||
lodash.restparam "^3.0.0"
|
||||
lodash.templatesettings "^3.0.0"
|
||||
|
||||
lodash.template@^4.2.5:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
|
||||
@ -4500,6 +4552,13 @@ lodash.template@^4.2.5:
|
||||
lodash._reinterpolate "~3.0.0"
|
||||
lodash.templatesettings "^4.0.0"
|
||||
|
||||
lodash.templatesettings@^3.0.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
|
||||
dependencies:
|
||||
lodash._reinterpolate "^3.0.0"
|
||||
lodash.escape "^3.0.0"
|
||||
|
||||
lodash.templatesettings@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
|
||||
@ -5598,7 +5657,7 @@ read@1, read@~1.0.1, read@~1.0.7:
|
||||
dependencies:
|
||||
mute-stream "~0.0.4"
|
||||
|
||||
"readable-stream@1 || 2", readable-stream@^2, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.2.2:
|
||||
"readable-stream@1 || 2", "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
|
||||
dependencies:
|
||||
@ -5610,6 +5669,18 @@ read@1, read@~1.0.1, read@~1.0.7:
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@^2, readable-stream@~2.1.5:
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
|
||||
dependencies:
|
||||
buffer-shims "^1.0.0"
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "~1.0.0"
|
||||
process-nextick-args "~1.0.6"
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@~1.0.2:
|
||||
version "1.0.34"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
|
||||
@ -5630,18 +5701,6 @@ readable-stream@~2.0.5:
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@~2.1.5:
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
|
||||
dependencies:
|
||||
buffer-shims "^1.0.0"
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "~1.0.0"
|
||||
process-nextick-args "~1.0.6"
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
|
||||
@ -6918,6 +6977,10 @@ websocket-extensions@>=0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7"
|
||||
|
||||
whatwg-fetch@^0.11.0:
|
||||
version "0.11.1"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-0.11.1.tgz#6d3ded245fdd97cd728e0e2587b54b733949e663"
|
||||
|
||||
which-module@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
|
||||
|
Loading…
Reference in New Issue
Block a user