feat: Display password account's loginname in list
This commit is contained in:
4 files changed
+39
-3
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user