chore: Managed groups edit integration fix

This commit is contained in:
Susmitha Girumala committed 2021-11-11 17:58:08 -05:00
1 parent afec300c99
commit 6ba9ffc3af
5 files changed
+26 -7

No files matched your search

@@ -56,9 +56,16 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends
)
async save(managedGroup) {
await managedGroup.save();
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.managed-groups'
);
if (this.can.can('read model', managedGroup)) {
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.managed-groups.managed-group',
managedGroup
);
} else {
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.managed-groups'
);
}
this.refresh();
}
@@ -71,7 +78,7 @@ export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsRoute extends
@confirm('questions.delete-confirm')
@notifyError(({ message }) => message, { catch: true })
@notifySuccess('notifications.delete-success')
async deleteManagedGroup(managedGroup) {
async delete(managedGroup) {
await managedGroup.destroyRecord();
await this.replaceWith(
'scopes.scope.auth-methods.auth-method.managed-groups'