From 0ba8568f96a56639394cfeff1d4d49b1fc32792a Mon Sep 17 00:00:00 2001 From: Mike Finnessy Date: Thu, 17 Oct 2024 13:03:26 -0600 Subject: [PATCH] moved auth settings to its own security tab (#224) --- .../routes/authenticationconfigurations.js | 4 ++-- .../admin-authentication-create.component.ts | 10 +++++----- .../admin-authentication.component.html | 3 +++ .../admin-authentication.component.ts | 6 ++++++ .../admin-settings.component.html | 5 ----- web-app/admin/src/ng1/admin/admin.tab.html | 6 ++++++ web-app/admin/src/ng1/app.js | 19 ++++++++++++++----- 7 files changed, 36 insertions(+), 17 deletions(-) diff --git a/service/src/routes/authenticationconfigurations.js b/service/src/routes/authenticationconfigurations.js index cdf239035..8f119dc6d 100644 --- a/service/src/routes/authenticationconfigurations.js +++ b/service/src/routes/authenticationconfigurations.js @@ -101,7 +101,7 @@ module.exports = function (app, security) { const securityData = {}; - const settings = JSON.parse(req.body.settings); + const { settings } = req.body; Object.keys(settings).forEach(key => { if (blacklist && blacklist.indexOf(key.toLowerCase()) != -1) { @@ -184,7 +184,7 @@ module.exports = function (app, security) { const securityData = {}; - const settings = JSON.parse(req.body.settings); + const { settings } = req.body; Object.keys(settings).forEach(key => { if (blacklist && blacklist.indexOf(key.toLowerCase()) != -1) { diff --git a/web-app/admin/src/app/admin/admin-authentication/admin-authentication-create/admin-authentication-create.component.ts b/web-app/admin/src/app/admin/admin-authentication/admin-authentication-create/admin-authentication-create.component.ts index 60a2dd104..8393b7ca2 100644 --- a/web-app/admin/src/app/admin/admin-authentication/admin-authentication-create/admin-authentication-create.component.ts +++ b/web-app/admin/src/app/admin/admin-authentication/admin-authentication-create/admin-authentication-create.component.ts @@ -17,10 +17,10 @@ import { Strategy } from '../../admin-authentication/admin-settings.model'; }) export class AuthenticationCreateComponent implements OnInit { breadcrumbs: AdminBreadcrumb[] = [{ - title: 'Settings', - icon: 'build', + title: 'Security', + icon: 'shield', state: { - name: 'admin.settings' + name: 'admin.security' } }]; strategy: Strategy; @@ -124,13 +124,13 @@ export class AuthenticationCreateComponent implements OnInit { save(): void { this.authenticationConfigurationService.createConfiguration(this.strategy).then(() => { - this.stateService.go('admin.settings'); + this.stateService.go('admin.security'); }).catch((err: any) => { console.error(err); this.snackBar.open('An error occured while creating ' + this.strategy.title, null, { duration: 2000, }) - this.stateService.go('admin.settings'); + this.stateService.go('admin.security'); }); } diff --git a/web-app/admin/src/app/admin/admin-authentication/admin-authentication.component.html b/web-app/admin/src/app/admin/admin-authentication/admin-authentication.component.html index 0141543ff..bb48b8f7f 100644 --- a/web-app/admin/src/app/admin/admin-authentication/admin-authentication.component.html +++ b/web-app/admin/src/app/admin/admin-authentication/admin-authentication.component.html @@ -1,3 +1,6 @@ +
+ +