diff --git a/angular.json b/angular.json
index fb22eefd4..f3a7abdae 100644
--- a/angular.json
+++ b/angular.json
@@ -95,7 +95,8 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
- "browserTarget": "red-ui:build"
+ "browserTarget": "red-ui:build",
+ "proxyConfig": "proxy.config.json"
},
"configurations": {
"production": {
diff --git a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html
index ba98ea0e4..180ec0c3f 100644
--- a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html
+++ b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.html
@@ -24,9 +24,7 @@
@@ -39,6 +37,7 @@
+
diff --git a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.scss b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.scss
index ea43e6f7f..202a9da9c 100644
--- a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.scss
+++ b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.scss
@@ -16,3 +16,11 @@
height: calc(100% + 50px);
z-index: 1;
}
+
+iframe {
+ background: white;
+ width: 500px;
+ height: 500px;
+ position: absolute;
+ z-index: 100;
+}
diff --git a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts
index fce3cb90e..359cf01de 100644
--- a/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts
+++ b/apps/red-ui/src/app/components/user-profile/user-profile-screen.component.ts
@@ -5,6 +5,8 @@ import { PermissionsService } from '@services/permissions.service';
import { LanguageService } from '@i18n/language.service';
import { TranslateService } from '@ngx-translate/core';
import { UserControllerService } from '@redaction/red-ui-http';
+import { AppConfigKey, AppConfigService } from '@app-config/app-config.service';
+import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'redaction-user-profile-screen',
@@ -14,14 +16,18 @@ import { UserControllerService } from '@redaction/red-ui-http';
export class UserProfileScreenComponent implements OnInit {
viewReady = false;
formGroup: FormGroup;
+ changePasswordUrl: any;
+
private _profileModel: ProfileModel;
constructor(
readonly permissionsService: PermissionsService,
private readonly _formBuilder: FormBuilder,
private readonly _userService: UserService,
+ private readonly _appConfigService: AppConfigService,
private readonly _userControllerService: UserControllerService,
private readonly _languageService: LanguageService,
+ private readonly _domSanitizer: DomSanitizer,
private readonly _translateService: TranslateService
) {
this.formGroup = this._formBuilder.group({
@@ -30,6 +36,10 @@ export class UserProfileScreenComponent implements OnInit {
lastName: [undefined],
language: [undefined]
});
+
+ this.changePasswordUrl = this._domSanitizer.bypassSecurityTrustResourceUrl(
+ this._appConfigService.getConfig(AppConfigKey.OAUTH_URL) + '/account/password'
+ );
}
get languageChanged(): boolean {
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index fb30e0b9d..c97e340c8 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -1345,7 +1345,8 @@
"user-management": "User Management",
"user-profile": {
"actions": {
- "save": "Save profile"
+ "save": "Save profile",
+ "change-password": "Change Password"
},
"form": {
"email": "Email",
diff --git a/proxy.config.json b/proxy.config.json
new file mode 100644
index 000000000..bd0788da7
--- /dev/null
+++ b/proxy.config.json
@@ -0,0 +1,8 @@
+{
+ "/auth/*": {
+ "target": "http://localhost:8080/",
+ "secure": false,
+ "logLevel": "debug",
+ "changeOrigin": true
+ }
+}