Skip to content

Commit 5158938

Browse files
committed
fix: deprecate enable parameter in TFA section
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 8876d2f commit 5158938

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h6 class="font-weight-semibold mb-2">{{section.section | titlecase}}</h6>
2828
class="mr-2"
2929
*ngIf="section.shortName === sectionType[sectionType.EMAIL]"></app-utm-email-conf-check>
3030

31-
<app-utm-tfa-conf-check [validConfig]="(!checkConfigValid() || saving || !isEnabledTfa())"
31+
<app-utm-tfa-conf-check [validConfig]="(!checkConfigValid() || saving)"
3232
[configToSave]="configToSave"
3333
[config]="configs"
3434
(isChecked) = "checkedTFAConfig($event)"

frontend/src/app/shared/components/utm/config/app-config-sections/app-config-sections.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,16 @@ export class AppConfigSectionsComponent implements OnInit, OnDestroy {
321321
}
322322

323323
getConfigs() {
324+
325+
this.configs = this.configs.filter(c => c.confParamShort !== 'utmstack.tfa.enable');
326+
324327
if (this.isOnline && this.section.id === this.sectionType.INSTANCE_REGISTRATION) {
325328
return this.configs.filter( c => c.confParamShort !== 'utmstack.instance.auth');
326329
} else {
327330
return this.configs;
328331
}
329332
}
330333

331-
isEnabledTfa(): boolean {
332-
return this.configs.some(conf => conf.confParamShort === 'utmstack.tfa.enable' && conf.confParamValue === 'true');
333-
}
334-
335334
serializeConfigValue(conf: SectionConfigParamType): string {
336335
if (conf.confParamDatatype === ConfigDataTypeEnum.Cron) {
337336
return JSON.stringify(conf.confParamValue);

0 commit comments

Comments
 (0)