Skip to content

Commit

Permalink
Fixed visibility of inactive attribute and hide filters (#3556)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrenkert authored and Magnus Schieder committed Apr 16, 2024
1 parent 773fdd6 commit 75941ac
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ <h4>{{ 'Name' | translate }}</h4>
&nbsp;
<span>({{ user.pronoun }})</span>
</ng-container>
<mat-icon *ngIf="!user.is_active && isAllowed('update')" matTooltip="{{ 'Inactive' | translate }}">
<mat-icon
*ngIf="!user.is_active && isAllowed('seeSensitiveData')"
matTooltip="{{ 'Inactive' | translate }}"
>
block
</mat-icon>
<mat-icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2>{{ 'Participants' | translate }}</h2>
<mat-icon matTooltip="{{ 'Is no natural person' | translate }}" *ngIf="!user.is_physical_person">
account_balance
</mat-icon>
<mat-icon matTooltip="{{ 'Inactive' | translate }}" *ngIf="!user.is_active && canManage">
<mat-icon matTooltip="{{ 'Inactive' | translate }}" *ngIf="!user.is_active && canSeeSensitiveData">
block
</mat-icon>
<mat-icon matTooltip="{{ 'Has SSO identification' | translate }}" *ngIf="user.hasSamlId && canManage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export class ParticipantListComponent extends BaseMeetingListViewComponent<ViewU
return this.operator.hasPerms(Permission.userCanUpdate);
}

public get canSeeSensitiveData(): boolean {
return this.operator.hasPerms(Permission.userCanSeeSensitiveData);
}

public get showVoteWeight(): boolean {
return this._isElectronicVotingEnabled && this.voteWeightEnabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService<V
shouldHideFn: () => {
return !this._voteDelegationEnabled;
}
},
{
property: `is_active`,
shouldHideFn() {
return !this.canSeeSensitiveData;
}
},
{
property: `hasSamlId`,
shouldHideFn() {
return !this.canManage;
}
}
];
}
Expand Down

0 comments on commit 75941ac

Please sign in to comment.