Skip to content

Commit 0e2c867

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2565 Refactor to keep the code clean
1 parent 56b11fc commit 0e2c867

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
@@ -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.isPasswordLoginEnabledForAdminsOnly)),
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
);
@@ -136,7 +136,7 @@ export class LogInComponent implements OnInit, OnDestroy {
136136
if (isBackdoor) {
137137
return authM.authMethodType === AuthMethodType.Password;
138138
}
139-
if (!isPasswordLoginEnabledForAdminsOnly) {
139+
if (isPasswordLoginEnabledForAdminsOnly) {
140140
return authM.authMethodType !== AuthMethodType.Password;
141141
}
142142
return true;

0 commit comments

Comments
 (0)