diff --git a/src/app/pages/profile/profile.component.html b/src/app/pages/profile/profile.component.html
index 29e627e..a1fd589 100644
--- a/src/app/pages/profile/profile.component.html
+++ b/src/app/pages/profile/profile.component.html
@@ -89,7 +89,7 @@
-
+
diff --git a/src/app/pages/profile/profile.component.ts b/src/app/pages/profile/profile.component.ts
index ba819b1..f5c193f 100644
--- a/src/app/pages/profile/profile.component.ts
+++ b/src/app/pages/profile/profile.component.ts
@@ -59,6 +59,7 @@ export class ProfileComponent implements OnInit {
let user : User = this.authService.getCurrentUserValue.user;
user.own_password = this.password.value;
user.password = this.passwordNew.value;
+
this.loading = true;
this.userService.updateUser(user).subscribe(
diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts
index d53810f..54adc6f 100644
--- a/src/app/services/auth.service.ts
+++ b/src/app/services/auth.service.ts
@@ -4,6 +4,7 @@ import { catchError, finalize, map, tap } from 'rxjs/operators';
import { environment } from '../../environments/environment';
import { Observable, BehaviorSubject, of } from 'rxjs';
import { AuthUser } from "../models/user";
+import { JsonPipe } from '@angular/common';
@Injectable({
@@ -32,6 +33,14 @@ export class AuthService {
if (value === null){
value = new AuthUser();
}
+ if (value.user != undefined){
+ let roles = [];
+ for (let role of value.user.roles){
+ roles.push(role.name);
+ }
+ value.user.rolesString = roles.join(', ');
+ console.log("Getting user" + JSON.stringify(value));
+ }
return value;
}