web: fix BoundPoliciesList not showing policy correctly

This commit is contained in:
Jens Langhammer 2021-02-28 10:19:19 +01:00
parent 9bb46ecb88
commit 30a1b65e94
2 changed files with 3 additions and 4 deletions

View File

@ -5,8 +5,7 @@ import { User } from "./Users";
export class PolicyBinding {
pk: string;
policy: string;
policy_obj?: Policy;
policy?: Policy;
group?: Group;
user?: User;
target: string;

View File

@ -33,8 +33,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
}
getPolicyUserGroupRow(item: PolicyBinding): string {
if (item.policy_obj) {
return gettext(`Policy ${item.policy_obj.name}`);
if (item.policy) {
return gettext(`Policy ${item.policy.name}`);
} else if (item.group) {
return gettext(`Group ${item.group.name}`);
} else if (item.user) {