Skip to content

Commit 56b11fc

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2565 Renamed property and found old instances of the property and renamed them
1 parent 1d25144 commit 56b11fc

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

config/config.example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ auth:
133133
# This is independent from the idle warning.
134134
timeLeftBeforeTokenRefresh: 120000 # 2 minutes
135135
# Standard login enabled
136-
disableStandardLogin: false
136+
isPasswordLoginEnabledForAdminsOnly: false
137137

138138
# Form settings
139139
form:

src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ import {
184184
data: {
185185
isBackDoor: true,
186186
},
187-
canMatch: [() => environment.auth.enableAdminOnlyLogin],
187+
canMatch: [() => environment.auth.isPasswordLoginEnabledForAdminsOnly],
188188
},
189189
{
190190
path: 'login',

src/app/shared/log-in/log-in.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class LogInComponent implements OnInit, OnDestroy {
9999
filter(routeData => !!routeData),
100100
map(data => data.isBackDoor),
101101
)),
102-
map(([methods, isBackdoor]) => this.filterAndSortAuthMethods(methods, isBackdoor, !environment.auth.enableAdminOnlyLogin)),
102+
map(([methods, isBackdoor]) => this.filterAndSortAuthMethods(methods, isBackdoor, !environment.auth.isPasswordLoginEnabledForAdminsOnly)),
103103
// ignore the ip authentication method when it's returned by the backend
104104
map((authMethods: AuthMethod[]) => uniqBy(authMethods.filter(a => a.authMethodType !== AuthMethodType.Ip), 'authMethodType'))
105105
);
@@ -130,13 +130,13 @@ export class LogInComponent implements OnInit, OnDestroy {
130130
);
131131
}
132132

133-
filterAndSortAuthMethods(authMethods: AuthMethod[], isBackdoor: boolean, isStandardLoginDisabled = false): AuthMethod[] {
133+
filterAndSortAuthMethods(authMethods: AuthMethod[], isBackdoor: boolean, isPasswordLoginEnabledForAdminsOnly = false): AuthMethod[] {
134134
return authMethods.filter((authMethod: AuthMethod) => {
135135
const methodComparison = (authM) => {
136136
if (isBackdoor) {
137137
return authM.authMethodType === AuthMethodType.Password;
138138
}
139-
if (!isStandardLoginDisabled) {
139+
if (!isPasswordLoginEnabledForAdminsOnly) {
140140
return authM.authMethodType !== AuthMethodType.Password;
141141
}
142142
return true;

src/config/auth-config.interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ export interface AuthConfig extends Config {
2222
};
2323

2424
// Whether the standard login form should be enabled.
25-
enableAdminOnlyLogin?: boolean;
25+
isPasswordLoginEnabledForAdminsOnly?: boolean;
2626
}

src/config/default-app-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class DefaultAppConfig implements AppConfig {
136136
// This is independent from the idle warning.
137137
timeLeftBeforeTokenRefresh: 2 * 60 * 1000 // 2 minutes
138138
},
139-
enableAdminOnlyLogin: false, // Enable the standard login form
139+
isPasswordLoginEnabledForAdminsOnly: false, // Enable the standard login form
140140
};
141141

142142
// Form settings

src/environments/environment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const environment: BuildConfig = {
9797
// This is independent from the idle warning.
9898
timeLeftBeforeTokenRefresh: 20000, // 20 sec
9999
},
100-
enableAdminOnlyLogin: true,
100+
isPasswordLoginEnabledForAdminsOnly: true,
101101
},
102102

103103
// Form settings

0 commit comments

Comments
 (0)