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 {
|
||||
pk: string;
|
||||
policy: string;
|
||||
policy_obj?: Policy;
|
||||
policy?: Policy;
|
||||
group?: Group;
|
||||
user?: User;
|
||||
target: string;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Reference in a new issue