Removed LN Config Auth for SSO

pull/1149/head
ShahanaFarooqui 1 year ago
parent 6804fc762d
commit 0e48676c5c

@ -17,6 +17,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/rtl/",
"outputPath": "frontend",
"index": "src/index.html",
"main": "src/main.ts",

@ -41,8 +41,8 @@ export class ExpressApplication {
this.app.use(this.common.baseHref + '/api/ecl', eclRoutes);
this.app.use(this.common.baseHref, express.static(join(this.directoryName, '../..', 'frontend')));
this.app.use((req, res, next) => {
res.cookie('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : ''); // RTL Angular Frontend
res.setHeader('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : ''); // RTL Quickpay JQuery
res.cookie('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : (req.cookies && req.cookies._csrf) ? req.cookies._csrf : ''); // RTL Angular Frontend
res.setHeader('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : (req.cookies && req.cookies._csrf) ? req.cookies._csrf : ''); // RTL Quickpay JQuery
res.sendFile(join(this.directoryName, '../..', 'frontend', 'index.html'));
});
this.app.use((err, req, res, next) => {

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<title>RTL</title>
<base href="/">
<base href="/rtl/">
<meta i18n-content="" name="viewport" content="width=device-width, initial-scale=1">
<link i18n-sizes="" i18n-rel="" rel="apple-touch-icon" sizes="180x180" href="assets/images/favicon-light/apple-touch-icon.png">
<link i18n-sizes="" i18n-rel="" rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-light/favicon-32x32.png">
@ -10,10 +10,10 @@
<link i18n-rel="" rel="mask-icon" href="assets/images/favicon-light/safari-pinned-tab.svg" color="#5bbad5">
<meta i18n-content="" name="msapplication-TileColor" content="#da532c">
<meta i18n-content="" name="theme-color" content="#ffffff">
<style>@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:100%}@media only screen and (max-width: 56.25em){html{font-size:90%}}@media only screen and (max-width: 37.5em){html{font-size:80%}}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}</style><link rel="stylesheet" href="styles.71aa18de11464e29.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.71aa18de11464e29.css"></noscript></head>
<style>@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:100%}@media only screen and (max-width: 56.25em){html{font-size:90%}}@media only screen and (max-width: 37.5em){html{font-size:80%}}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}</style><link rel="stylesheet" href="styles.eca24c3a2d154558.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.eca24c3a2d154558.css"></noscript></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.604114e6d4d7795b.js" type="module"></script><script src="polyfills.08e0233279c8a187.js" type="module"></script><script src="main.8cd5f559f5e04955.js" type="module"></script>
<script src="runtime.604114e6d4d7795b.js" type="module"></script><script src="polyfills.08e0233279c8a187.js" type="module"></script><script src="main.9adeb355b4b766c7.js" type="module"></script>
<script>window.global = window;</script>
</body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -63,8 +63,8 @@ export class ExpressApplication {
this.app.use(this.common.baseHref + '/api/ecl', eclRoutes);
this.app.use(this.common.baseHref, express.static(join(this.directoryName, '../..', 'frontend')));
this.app.use((req: any, res, next) => {
res.cookie('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : ''); // RTL Angular Frontend
res.setHeader('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : ''); // RTL Quickpay JQuery
res.cookie('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : (req.cookies && req.cookies._csrf) ? req.cookies._csrf : ''); // RTL Angular Frontend
res.setHeader('XSRF-TOKEN', req.csrfToken ? req.csrfToken() : (req.cookies && req.cookies._csrf) ? req.cookies._csrf : ''); // RTL Quickpay JQuery
res.sendFile(join(this.directoryName, '../..', 'frontend', 'index.html'));
});
this.app.use((err, req, res, next) => {

@ -8,9 +8,9 @@ import { openAlert } from '../../../store/rtl.actions';
import { RTLEffects } from '../../../store/rtl.effects';
import { IsAuthorizedComponent } from '../../components/data-modal/is-authorized/is-authorized.component';
import { ConfigSettingsNode } from '../../models/RTLconfig';
import { ConfigSettingsNode, RTLConfiguration } from '../../models/RTLconfig';
import { RTLState } from '../../../store/rtl.state';
import { rootSelectedNode } from '../../../store/rtl.selector';
import { rootAppConfig, rootSelectedNode } from '../../../store/rtl.selector';
@Component({
selector: 'rtl-node-config',
@ -21,11 +21,12 @@ export class NodeConfigComponent implements OnInit, OnDestroy {
public faTools = faTools;
public showLnConfig = false;
public appConfig: RTLConfiguration;
public selNode: ConfigSettingsNode | any;
public lnImplementationStr = '';
public links = [{ link: 'nodesettings', name: 'Node Settings' }, { link: 'pglayout', name: 'Page Layout' }, { link: 'services', name: 'Services' }, { link: 'experimental', name: 'Experimental' }, { link: 'lnconfig', name: this.lnImplementationStr }];
public activeLink = '';
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private store: Store<RTLState>, private router: Router, private rtlEffects: RTLEffects, private activatedRoute: ActivatedRoute) { }
@ -39,7 +40,10 @@ export class NodeConfigComponent implements OnInit, OnDestroy {
this.activeLink = linkFound ? linkFound.link : this.links[0].link;
}
});
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[1])).subscribe((selNode) => {
this.store.select(rootAppConfig).pipe(takeUntil(this.unSubs[1])).subscribe((appConfig) => {
this.appConfig = appConfig;
});
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[2])).subscribe((selNode) => {
this.showLnConfig = false;
this.selNode = selNode;
switch (this.selNode.lnImplementation?.toUpperCase()) {
@ -63,20 +67,25 @@ export class NodeConfigComponent implements OnInit, OnDestroy {
}
showLnConfigClicked() {
this.store.dispatch(openAlert({
payload: {
maxWidth: '50rem',
data: {
component: IsAuthorizedComponent
if (!this.appConfig.sso.rtlSSO) {
this.store.dispatch(openAlert({
payload: {
maxWidth: '50rem',
data: {
component: IsAuthorizedComponent
}
}
}
}));
this.rtlEffects.closeAlert.pipe(takeUntil(this.unSubs[1])).subscribe((alertRes) => {
if (alertRes) {
this.activeLink = this.links[4].link;
this.router.navigate(['./' + this.activeLink], { relativeTo: this.activatedRoute });
}
});
}));
this.rtlEffects.closeAlert.pipe(takeUntil(this.unSubs[3])).subscribe((alertRes) => {
if (alertRes) {
this.activeLink = this.links[4].link;
this.router.navigate(['./' + this.activeLink], { relativeTo: this.activatedRoute });
}
});
} else {
this.activeLink = this.links[4].link;
this.router.navigate(['./' + this.activeLink], { relativeTo: this.activatedRoute });
}
}
ngOnDestroy() {

@ -10,7 +10,7 @@
<span>The setting will apply after RTL server restarts.</span>
</div>
<div fxLayout="row" fxLayoutAlign="start start">
<mat-form-field fxLayout="column" fxLayout="row" fxLayoutAlign="start start">
<mat-form-field fxLayout="column" fxLayoutAlign="start start">
<mat-select autoFocus tabindex="1" name="defaultNode" [(ngModel)]="appConfig.defaultNodeIndex">
<mat-option *ngFor="let node of appConfig.nodes" [value]="node.index">
{{node.lnNode}} ({{node.lnImplementation}})

@ -1423,6 +1423,10 @@ mat-cell:last-of-type, .mdc-data-table__header-cell:last-of-type, mat-footer-cel
display: none !important;
}
.mat-divider.mat-divider-horizontal.mat-divider-inset {
margin-left: $gap*2;
}
.mat-vertical-stepper-header {
padding: ($gap*1.25) ($gap*1.25) ($gap*1.25) $gap !important;
}

@ -55,21 +55,35 @@
}
}
.rtl-snack-bar {
.rtl-snack-bar.mat-mdc-snack-bar-container {
max-width: 90vw !important;
font-weight: 700;
& .mdc-snackbar__surface {
max-width: 40vw;
}
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
}
}
.rtl-warn-snack-bar {
.rtl-warn-snack-bar.mat-mdc-snack-bar-container {
max-width: 90vw !important;
font-weight: 700;
& .mdc-snackbar__surface {
max-width: 40vw;
}
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
color: $warn-color;
}
}
.rtl-accent-snack-bar {
.rtl-accent-snack-bar.mat-mdc-snack-bar-container {
max-width: 90vw !important;
font-weight: 700;
& .mdc-snackbar__surface {
max-width: 40vw;
}
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
color: $accent-color;
}
}

@ -65,10 +65,10 @@
}
}
.mat-mdc-snack-bar-container.rtl-snack-bar {
max-width: 90vw !important;
font-weight: 600;
& .mdc-snackbar__surface,
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
background-color: $background-color;
opacity: 0.9 !important;
border-radius: 4px;
@ -80,6 +80,7 @@
font-weight: 600;
& .mdc-snackbar__surface,
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
background-color: $background-color;
opacity: 0.9 !important;
border-radius: 4px;
@ -91,6 +92,7 @@
font-weight: 600;
& .mdc-snackbar__surface,
& .mat-mdc-snack-bar-label.mdc-snackbar__label {
max-width: 40vw;
background-color: $background-color;
opacity: 0.9 !important;
border-radius: 4px;

@ -13,7 +13,7 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"downlevelIteration": true,
"sourceMap": true,
"sourceMap": false,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",

Loading…
Cancel
Save