Skip to content

Commit fe9e7e8

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2565 Refactor to keep the code clean
1 parent b8d110c commit fe9e7e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 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.isPasswordLoginEnabledForAdminsOnly)),
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
);
@@ -171,7 +171,7 @@ export class LogInComponent implements OnInit, OnDestroy {
171171
if (isBackdoor) {
172172
return authM.authMethodType === AuthMethodType.Password;
173173
}
174-
if (!isPasswordLoginEnabledForAdminsOnly) {
174+
if (isPasswordLoginEnabledForAdminsOnly) {
175175
return authM.authMethodType !== AuthMethodType.Password;
176176
}
177177
return true;

0 commit comments

Comments
 (0)