Skip to content

Commit

Permalink
Fix public access settings and group visibility (#4459)
Browse files Browse the repository at this point in the history
  • Loading branch information
anbebe authored Dec 17, 2024
1 parent 056aa70 commit ea06ea7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Directive, inject } from '@angular/core';
import { Id } from 'src/app/domain/definitions/key-types';
import { BaseComponent } from 'src/app/site/base/base.component';
import { OrganizationSettingsService } from 'src/app/site/pages/organization/services/organization-settings.service';

import { ActiveMeetingService } from '../services/active-meeting.service';
import { ActiveMeetingIdService } from '../services/active-meeting-id.service';
Expand Down Expand Up @@ -31,4 +32,6 @@ export abstract class BaseMeetingComponent extends BaseComponent {
}

public override componentServiceCollector = inject(MeetingComponentServiceCollectorService);

public orgaSettingsService = inject(OrganizationSettingsService);
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<span>{{ setting.helpText | translate }}</span>
</mat-hint>
}
@if (getWarning()) {
@if (hasWarning()) {
<mat-hint class="hint-checkbox">
<span>{{ setting.warnText | translate }}</span>
</mat-hint>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class MeetingSettingsGroupDetailFieldComponent extends BaseComponent impl
}
]
});
if (this.disabled) {
if (this.disabled || this.hasWarning()) {
this.form.disable();
}
this.internalValue = this.value ?? this.meetingSettingsDefinitionProvider.getDefaultValue(this.setting);
Expand Down Expand Up @@ -278,7 +278,7 @@ export class MeetingSettingsGroupDetailFieldComponent extends BaseComponent impl
* Checks if a warning should be given
*
*/
public getWarning(): boolean {
public hasWarning(): boolean {
if (this.setting.warn) {
return this.setting.warn(this.orgaSettings);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export class GroupListComponent extends BaseMeetingComponent implements OnInit,

this.repo.getViewModelListObservable().subscribe(newViewGroups => {
if (newViewGroups) {
if (!this.meetingSettingsService.instant(`enable_anonymous`)) {
if (
!this.meetingSettingsService.instant(`enable_anonymous`) ||
!this.orgaSettingsService.instant(`enable_anonymous`)
) {
newViewGroups = newViewGroups.filter(group => !group.anonymous_group_for_meeting_id);
} else {
newViewGroups = newViewGroups.slice();
Expand Down

0 comments on commit ea06ea7

Please sign in to comment.