Merge branch 'develop' into ICU-294-new-host-set
This commit is contained in:
4 files changed
+34
No files matched your search
@@ -58,4 +58,21 @@ export default class ScopesScopeAuthMethodsRoute extends Route {
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an auth method in current scope and redirect to index
|
||||
* @param {AuthMethodModel} authMethod
|
||||
*/
|
||||
@action
|
||||
async delete(authMethod) {
|
||||
try {
|
||||
await authMethod.destroyRecord();
|
||||
this.refresh();
|
||||
this.notify.success(this.intl.t('notify.delete-success'));
|
||||
this.transitionTo('scopes.scope.auth-methods');
|
||||
} catch (error) {
|
||||
//TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,18 @@
|
||||
</Rose::Nav::Tabs>
|
||||
</page.navigation>
|
||||
|
||||
<page.actions>
|
||||
<Rose::Dropdown @text="{{t 'form.label.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-auth-method'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
</page.actions>
|
||||
|
||||
<page.body>
|
||||
<Form::AuthMethod
|
||||
@model={{@model}}
|
||||
|
||||
@@ -72,6 +72,10 @@ module('Acceptance | auth methods', function (hooks) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('can delete an auth method', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
test('saving a new auth method with invalid fields displays error messages', async function (assert) {
|
||||
assert.expect(0);
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@ actions:
|
||||
delete-role: Delete role
|
||||
delete-project: Delete project
|
||||
delete-host-catalog: Delete host catalog
|
||||
delete-auth-method: Delete auth method
|
||||
delete-host-set: Delete host set
|
||||
add-host-set: Create Host Set
|
||||
auth:
|
||||
|
||||
Reference in new issue
Block a user