Skip to content

Commit

Permalink
Fix public access button not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Oct 9, 2024
1 parent 393fa56 commit 9f1d6cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <h1>
<os-spinner [height]="20" [showText]="false" [width]="20"></os-spinner>
}
</button>
@if (guestsEnabled && showExtra) {
@if (guestsEnabled && showExtra && orgaPublicAccessEnabled) {
<button class="login-button" mat-stroked-button type="button" (click)="guestLogin()">
{{ 'Public access' | translate }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ export class LoginMaskComponent extends BaseMeetingComponent implements OnInit,

public loading = true;

/**
* The message, that should appear, when the user logs in.
*/
private loginMessage = `Loading data. Please wait ...`;
public orgaPublicAccessEnabled = true;

private currentMeetingId: number | null = null;
private guestMeetingId: number | null = null;
Expand Down Expand Up @@ -118,7 +115,8 @@ export class LoginMaskComponent extends BaseMeetingComponent implements OnInit,
*/
public ngOnInit(): void {
this.subscriptions.push(
this.orgaSettings.get(`login_text`).subscribe(notice => (this.installationNotice = notice))
this.orgaSettings.get(`login_text`).subscribe(notice => (this.installationNotice = notice)),
this.orgaSettings.get(`enable_anonymous`).subscribe(enabled => (this.orgaPublicAccessEnabled = enabled))
);

// Maybe the operator changes and the user is logged in. If so, redirect him and boot OpenSlides.
Expand All @@ -132,15 +130,13 @@ export class LoginMaskComponent extends BaseMeetingComponent implements OnInit,
this.route.queryParams.pipe(filter(params => params[`checkBrowser`])).subscribe(params => {
this.checkBrowser = params[`checkBrowser`] === `true`;
});
if (this.orgaSettings.instant(`enable_anonymous`)) {
this.route.params.subscribe(params => {
if (params[`meetingId`]) {
this.loadMeeting(params[`meetingId`]);
} else {
this.loadActiveMeetings();
}
});
}
this.route.params.subscribe(params => {
if (params[`meetingId`]) {
this.loadMeeting(params[`meetingId`]);
} else {
this.loadActiveMeetings();
}
});

if (this.checkBrowser) {
this.checkDevice();
Expand Down

0 comments on commit 9f1d6cb

Please sign in to comment.