Skip to content

Commit

Permalink
CRs
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Oct 9, 2024
1 parent de2f3db commit e00ec02
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Injectable } from '@angular/core';
import { getUnixTime } from 'date-fns';
import { Action } from 'src/app/gateways/actions';
import { OrganizationSettingsService } from 'src/app/site/pages/organization/services/organization-settings.service';

import { Id } from '../../domain/definitions/key-types';
import { Identifiable } from '../../domain/interfaces/identifiable';
Expand Down Expand Up @@ -42,7 +43,8 @@ export interface MeetingUserModifiedFields {
export class MeetingRepositoryService extends BaseRepository<ViewMeeting, Meeting> {
public constructor(
repositoryServiceCollector: RepositoryServiceCollectorService,
private meetingSettingsDefinitionProvider: MeetingSettingsDefinitionService
private meetingSettingsDefinitionProvider: MeetingSettingsDefinitionService,
private orgaSettingsService: OrganizationSettingsService
) {
super(repositoryServiceCollector, Meeting);
}
Expand Down Expand Up @@ -257,6 +259,8 @@ export class MeetingRepositoryService extends BaseRepository<ViewMeeting, Meetin
): {
title: string;
} => this.getProjectorTitle(viewModel, projection);
viewModel.publicAccessPossible = (): boolean =>
model.enable_anonymous && this.orgaSettingsService.instant(`enable_anonymous`);
return viewModel;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,15 @@ export class LoginMaskComponent extends BaseMeetingComponent implements OnInit,
this.route.queryParams.pipe(filter(params => params[`checkBrowser`])).subscribe(params => {
this.checkBrowser = params[`checkBrowser`] === `true`;
});
this.route.params.subscribe(params => {
if (params[`meetingId`]) {
this.loadMeeting(params[`meetingId`]);
} else {
this.loadActiveMeetings();
}
});
if (this.orgaSettings.instant(`enable_anonymous`)) {
this.route.params.subscribe(params => {
if (params[`meetingId`]) {
this.loadMeeting(params[`meetingId`]);
} else {
this.loadActiveMeetings();
}
});
}

if (this.checkBrowser) {
this.checkDevice();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export class ViewMeeting extends BaseHasMeetingUsersViewModel<Meeting> {

protected _collection = Meeting.COLLECTION;

public publicAccessPossible!: () => boolean;

public getUrl(): string {
return `/${this.id}/`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h2>{{ 'Calendar' | translate }}</h2>
@if (meeting.isArchived) {
<mat-icon matTooltip="{{ 'This meeting is archived' | translate }}">archive</mat-icon>
}
@if (meeting.enable_anonymous && !operator.isAnonymous) {
@if (meeting.publicAccessPossible() && !operator.isAnonymous) {
<mat-icon matTooltip="{{ 'This meeting is public' | translate }}">public</mat-icon>
}
@if (meeting.committee_id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class DashboardComponent extends BaseComponent {
meeting =>
this.operator.isInMeeting(meeting.id) ||
this.operator.isSuperAdmin ||
(meeting.enable_anonymous && this.operator.isAnonymous)
(meeting.publicAccessPossible() && this.operator.isAnonymous)
);
const currentDate = new Date();
currentDate.setHours(0, 0, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,11 @@ <h2>{{ 'General' | translate }}</h2>
}
</mat-select>
</mat-form-field>
<div>
<section>
<mat-checkbox formControlName="require_duplicate_from">
{{ 'Public template required for creating new meeting' | translate }}
</mat-checkbox>
</div>

<div>
<mat-checkbox formControlName="enable_anonymous">
{{ 'Meetings can be public' | translate }}
</mat-checkbox>
</div>
</section>
</div>
</mat-card-content>
</mat-card>
Expand Down Expand Up @@ -110,6 +104,13 @@ <h2>{{ 'Superadmin settings' | translate }}</h2>
{{ 'Enable chat globally' | translate }}
</mat-checkbox>
</section>

<section>
<mat-checkbox formControlName="enable_anonymous">
{{ 'Meetings can be public' | translate }}
</mat-checkbox>
</section>

<section>
<mat-form-field subscriptSizing="dynamic">
<mat-label>{{ 'Limit of active meetings' | translate }}</mat-label>
Expand Down

0 comments on commit e00ec02

Please sign in to comment.