Skip to content

Commit d357d8c

Browse files
paulschattTexera
authored andcommitted
Added option to disable google login in the frontend configuration (#3219)
Fix #3220 ### Purpose Right now, both local and google login are enabled, which might confuse users. ### Changes 1. Introduced googleLogin in environment.default 2. Added googleLogin to dashboard.component 3. Hide the Google Login component in dashboard.component.html if googleLogin is false <img width="1470" alt="Bildschirmfoto 2025-01-17 um 17 33 05" src="https://github.com/user-attachments/assets/18845e12-6aaa-4399-a05f-8c05e3c643ff" /> --------- Co-authored-by: Texera <[email protected]>
1 parent 6b2d8d4 commit d357d8c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

core/gui/src/app/dashboard/component/dashboard.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<texera-user-icon></texera-user-icon>
149149
</ng-container>
150150
<asl-google-signin-button
151-
*ngIf="!isLogin"
151+
*ngIf="!isLogin && googleLogin"
152152
type="standard"
153153
size="large"
154154
width="200"></asl-google-signin-button>

core/gui/src/app/dashboard/component/dashboard.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
DASHBOARD_USER_QUOTA,
1818
DASHBOARD_USER_WORKFLOW,
1919
} from "../../app-routing.constant";
20+
import { environment } from "../../../environments/environment";
2021

2122
@Component({
2223
selector: "texera-dashboard",
@@ -28,7 +29,8 @@ export class DashboardComponent implements OnInit {
2829
@ViewChild(HubComponent) hubComponent!: HubComponent;
2930

3031
isAdmin: boolean = this.userService.isAdmin();
31-
isLogin: boolean = this.userService.isLogin();
32+
isLogin = this.userService.isLogin();
33+
googleLogin: boolean = environment.googleLogin;
3234
displayForum: boolean = true;
3335
displayNavbar: boolean = true;
3436
isCollpased: boolean = false;

core/gui/src/environments/environment.default.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ export const defaultEnvironment = {
2626
/**
2727
* whether user system is enabled
2828
*/
29-
userSystemEnabled: false,
29+
userSystemEnabled: true,
3030

3131
/**
3232
* whether local login is enabled
3333
*/
3434
localLogin: true,
3535

36+
/**
37+
* whether google login is enabled
38+
*/
39+
googleLogin: true,
3640
/**
3741
* whether invite only is enabled
3842
*/

0 commit comments

Comments
 (0)