Change user password integration
parent
dc2b98312c
commit
b460d3fbb0
|
@ -21,6 +21,7 @@ export class SidebarComponent {
|
|||
if (token) {
|
||||
try {
|
||||
this.decodedToken = jwtDecode(token);
|
||||
console.log('Decoded token:', this.decodedToken);
|
||||
this.isSuperAdmin = this.decodedToken.roles.includes('ROLE_SUPER_ADMIN');
|
||||
this.username = this.decodedToken.username;
|
||||
} catch (error) {
|
||||
|
|
|
@ -28,7 +28,9 @@ export class ChangePasswordModalComponent {
|
|||
}, { validators: this.passwordMatchValidator });
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
console.log('Data:', this.data);
|
||||
}
|
||||
|
||||
onNoClick(): void {
|
||||
this.dialogRef.close();
|
||||
|
@ -41,12 +43,12 @@ export class ChangePasswordModalComponent {
|
|||
|
||||
const userPayload = {
|
||||
username: this.userForm.value.username,
|
||||
allowedOrganizationalUnits: this.data.user.allowedOrganizationalUnits,
|
||||
allowedOrganizationalUnits: [],
|
||||
password: this.userForm.value.password,
|
||||
enabled: true,
|
||||
userGroups: this.data.user.userGroups
|
||||
userGroups: []
|
||||
};
|
||||
|
||||
console.log("THIS IS THE USER PAYLOAD: ", userPayload);
|
||||
this.userService.updateUser(this.data.uuid, userPayload).subscribe(
|
||||
response => {
|
||||
console.log('User updated successfully:', response);
|
||||
|
|
Loading…
Reference in New Issue