From c462fa4c512fabd3879500ed9b3c1505d5a060d2 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 8 Sep 2021 13:52:51 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20create-without-read=20cas?= =?UTF-8?q?e=20should=20redirect=20to=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/app/routes/scopes/scope/groups.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/admin/app/routes/scopes/scope/groups.js b/ui/admin/app/routes/scopes/scope/groups.js index 1784799cc..e1346ae4d 100644 --- a/ui/admin/app/routes/scopes/scope/groups.js +++ b/ui/admin/app/routes/scopes/scope/groups.js @@ -57,7 +57,11 @@ export default class ScopesScopeGroupsRoute extends Route { ) async save(group) { await group.save(); - await this.transitionTo('scopes.scope.groups.group', group); + if (this.can.can('read model', group)) { + await this.transitionTo('scopes.scope.groups.group', group); + } else { + await this.transitionTo('scopes.scope.groups'); + } this.refresh(); }