Disable change password form if the user can't change their password Fixes #3818
This commit is contained in:
parent
fd93c4d0d4
commit
5b4ae73401
2 changed files with 7 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
|||
<ng-container *transloco="let t; read:'change-password'">
|
||||
<app-setting-item [title]="t('password-label')" [canEdit]="canEdit" [isEditMode]="isEditMode" (editMode)="updateEditMode($event)">
|
||||
<app-setting-item [title]="t('password-label')"
|
||||
[subtitle]="(hasChangePasswordAbility | async) ? '' : t('permission-error')"
|
||||
[canEdit]="(hasChangePasswordAbility | async) || false"
|
||||
[isEditMode]="isEditMode" (editMode)="updateEditMode($event)"
|
||||
>
|
||||
<ng-template #view>
|
||||
<span class="col-12">***************</span>
|
||||
</ng-template>
|
||||
|
|
|
|||
|
|
@ -15,13 +15,14 @@ import {AccountService} from 'src/app/_services/account.service';
|
|||
import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
|
||||
import {translate, TranslocoDirective} from "@jsverse/transloco";
|
||||
import {SettingItemComponent} from "../../settings/_components/setting-item/setting-item.component";
|
||||
import {AsyncPipe} from "@angular/common";
|
||||
|
||||
@Component({
|
||||
selector: 'app-change-password',
|
||||
templateUrl: './change-password.component.html',
|
||||
styleUrls: ['./change-password.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [ReactiveFormsModule, TranslocoDirective, SettingItemComponent]
|
||||
imports: [ReactiveFormsModule, TranslocoDirective, SettingItemComponent, AsyncPipe]
|
||||
})
|
||||
export class ChangePasswordComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue