Skip to content

Commit

Permalink
Fix filters wrongly hidden in participant list (#3572)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrenkert authored Apr 17, 2024
1 parent 727542f commit 1a5da54
Showing 1 changed file with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Permission } from 'src/app/domain/definitions/permission';
import { GENDER_FITLERABLE, GENDERS } from 'src/app/domain/models/users/user';
import { OsFilter, OsHideFilterSetting } from 'src/app/site/base/base-filter.service';
import { BaseMeetingFilterListService } from 'src/app/site/pages/meetings/base/base-meeting-filter-list.service';
import { MeetingActiveFiltersService } from 'src/app/site/pages/meetings/services/meeting-active-filters.service';
import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service';
import { DelegationType } from 'src/app/site/pages/meetings/view-models/delegation-type';
import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user';
import { OperatorService } from 'src/app/site/services/operator.service';

import { GroupControllerService } from '../../../../modules/groups/services/group-controller.service';
import { StructureLevelControllerService } from '../../../structure-levels/services/structure-level-controller.service';
Expand Down Expand Up @@ -41,7 +43,8 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService<V
groupRepo: GroupControllerService,
structureRepo: StructureLevelControllerService,
private translate: TranslateService,
private meetingSettings: MeetingSettingsService
private meetingSettings: MeetingSettingsService,
private operator: OperatorService
) {
super(store);
this.updateFilterForRepo({
Expand Down Expand Up @@ -168,14 +171,26 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService<V
},
{
property: `is_active`,
shouldHideFn() {
return !this.canSeeSensitiveData;
shouldHideFn: (): boolean => {
return !this.operator.hasPerms(Permission.userCanSeeSensitiveData);
}
},
{
property: `hasSamlId`,
shouldHideFn() {
return !this.canManage;
shouldHideFn: (): boolean => {
return !this.operator.hasPerms(Permission.userCanManage);
}
},
{
property: `isLastEmailSent`,
shouldHideFn: (): boolean => {
return !this.operator.hasPerms(Permission.userCanSeeSensitiveData);
}
},
{
property: `isLastLogin`,
shouldHideFn: (): boolean => {
return !this.operator.hasPerms(Permission.userCanUpdate);
}
}
];
Expand Down

0 comments on commit 1a5da54

Please sign in to comment.