feat: Display password account's loginname in list

This commit is contained in:
Susmitha Girumala committed 2020-09-17 14:39:15 -04:00
1 parent bbb4426533
commit 905ee87858
4 files changed
+39 -3

No files matched your search

+18 -1
View File
@@ -1,13 +1,26 @@
import GeneratedAccountModel from '../generated/models/account';
import { fragment } from 'ember-data-model-fragments/attributes';
import { computed } from '@ember/object';
export default class AccountModel extends GeneratedAccountModel {
// =attributes
/**
* Attributes of this resource, if any, represented as a JSON fragment.
* @type {FragmentAccountAttributesModel}
*/
@fragment('fragment-account-attributes', { defaultValue: {} }) attributes;
/**
* Convenience for getting login_name attribute.
* @type {string}
*/
@computed('attributes.login_name')
get username() {
return this.attributes.login_name;
}
// =methods
/**
@@ -41,7 +54,11 @@ export default class AccountModel extends GeneratedAccountModel {
* @param {object} options.adapterOptions
* @return {Promise}
*/
changePassword(currentPassword, newPassword, options = { adapterOptions: {} }) {
changePassword(
currentPassword,
newPassword,
options = { adapterOptions: {} }
) {
const defaultAdapterOptions = {
method: 'change-password',
currentPassword,