web: fix BoundPoliciesList not showing policy correctly
This commit is contained in:
parent
9bb46ecb88
commit
30a1b65e94
|
@ -5,8 +5,7 @@ import { User } from "./Users";
|
||||||
|
|
||||||
export class PolicyBinding {
|
export class PolicyBinding {
|
||||||
pk: string;
|
pk: string;
|
||||||
policy: string;
|
policy?: Policy;
|
||||||
policy_obj?: Policy;
|
|
||||||
group?: Group;
|
group?: Group;
|
||||||
user?: User;
|
user?: User;
|
||||||
target: string;
|
target: string;
|
||||||
|
|
|
@ -33,8 +33,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPolicyUserGroupRow(item: PolicyBinding): string {
|
getPolicyUserGroupRow(item: PolicyBinding): string {
|
||||||
if (item.policy_obj) {
|
if (item.policy) {
|
||||||
return gettext(`Policy ${item.policy_obj.name}`);
|
return gettext(`Policy ${item.policy.name}`);
|
||||||
} else if (item.group) {
|
} else if (item.group) {
|
||||||
return gettext(`Group ${item.group.name}`);
|
return gettext(`Group ${item.group.name}`);
|
||||||
} else if (item.user) {
|
} else if (item.user) {
|
||||||
|
|
Reference in New Issue