From e389494a3b0c27a703aa772dbd960f668f343ee8 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 8 Sep 2021 14:20:04 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20redirect=20to=20index?= =?UTF-8?q?=20on=20save=20in=20create-without-read=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scope/auth-methods/auth-method/accounts.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js index d4e1ab55a..6166ae16b 100644 --- a/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js +++ b/ui/admin/app/routes/scopes/scope/auth-methods/auth-method/accounts.js @@ -60,10 +60,14 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route adapterOptions.password = password; } await account.save({ adapterOptions }); - await this.transitionTo( - 'scopes.scope.auth-methods.auth-method.accounts.account', - account - ); + if (this.can.can('read model', account)) { + await this.transitionTo( + 'scopes.scope.auth-methods.auth-method.accounts.account', + account + ); + } else { + await this.transitionTo('scopes.scope.auth-methods.auth-method.accounts'); + } this.refresh(); }