Skip to content

Commit b8d110c

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2565 Renamed property and found old instances of the property and renamed them
1 parent 397196f commit b8d110c

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/app/app-routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export const APP_ROUTES: Route[] = [
187187
data: {
188188
isBackDoor: true,
189189
},
190-
canMatch: [() => environment.auth.enableAdminOnlyLogin],
190+
canMatch: [() => environment.auth.isPasswordLoginEnabledForAdminsOnly],
191191
},
192192
{
193193
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
@@ -134,7 +134,7 @@ export class LogInComponent implements OnInit, OnDestroy {
134134
filter(routeData => !!routeData),
135135
map(data => data.isBackDoor),
136136
)),
137-
map(([methods, isBackdoor]) => this.filterAndSortAuthMethods(methods, isBackdoor, !environment.auth.enableAdminOnlyLogin)),
137+
map(([methods, isBackdoor]) => this.filterAndSortAuthMethods(methods, isBackdoor, !environment.auth.isPasswordLoginEnabledForAdminsOnly)),
138138
// ignore the ip authentication method when it's returned by the backend
139139
map((authMethods: AuthMethod[]) => uniqBy(authMethods.filter(a => a.authMethodType !== AuthMethodType.Ip), 'authMethodType')),
140140
);
@@ -165,13 +165,13 @@ export class LogInComponent implements OnInit, OnDestroy {
165165
);
166166
}
167167

168-
filterAndSortAuthMethods(authMethods: AuthMethod[], isBackdoor: boolean, isStandardLoginDisabled = false): AuthMethod[] {
168+
filterAndSortAuthMethods(authMethods: AuthMethod[], isBackdoor: boolean, isPasswordLoginEnabledForAdminsOnly = false): AuthMethod[] {
169169
return authMethods.filter((authMethod: AuthMethod) => {
170170
const methodComparison = (authM) => {
171171
if (isBackdoor) {
172172
return authM.authMethodType === AuthMethodType.Password;
173173
}
174-
if (!isStandardLoginDisabled) {
174+
if (!isPasswordLoginEnabledForAdminsOnly) {
175175
return authM.authMethodType !== AuthMethodType.Password;
176176
}
177177
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
@@ -147,7 +147,7 @@ export class DefaultAppConfig implements AppConfig {
147147
// This is independent from the idle warning.
148148
timeLeftBeforeTokenRefresh: 2 * 60 * 1000, // 2 minutes
149149
},
150-
enableAdminOnlyLogin: false, // Enable the standard login form
150+
isPasswordLoginEnabledForAdminsOnly: false, // Enable the standard login form
151151
};
152152

153153
// Form settings

src/environments/environment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const environment: BuildConfig = {
115115
// This is independent from the idle warning.
116116
timeLeftBeforeTokenRefresh: 20000, // 20 sec
117117
},
118-
enableAdminOnlyLogin: true,
118+
isPasswordLoginEnabledForAdminsOnly: true,
119119
},
120120

121121
// Form settings

0 commit comments

Comments
 (0)