mirror of https://github.com/rancher/dashboard.git
22 lines
568 B
JavaScript
22 lines
568 B
JavaScript
import { NORMAN, RBAC } from '@/config/types';
|
|
|
|
export default {
|
|
nameDisplay() {
|
|
const roleName = this.$getters['byId'](RBAC.GLOBAL_ROLE, this.globalRoleName);
|
|
|
|
const ownersName = this.groupPrincipalName ? this._displayPrincipal : this._displayUser;
|
|
|
|
return `${ roleName.displayName } (${ ownersName })` ;
|
|
},
|
|
|
|
_displayPrincipal() {
|
|
const principal = this.$rootGetters['rancher/byId'](NORMAN.PRINCIPAL, this.groupPrincipalName);
|
|
|
|
return `${ principal.name } - ${ principal.displayType }`;
|
|
},
|
|
|
|
_displayUser() {
|
|
return this.user;
|
|
}
|
|
};
|