mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-04 21:05:54 +08:00
fix showEdit bug (#13853)
This commit is contained in:
parent
55741984a7
commit
41e1d4e7bf
@ -233,10 +233,10 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
|
||||
* A user may restore items if they have delete permissions and the item is in the trash.
|
||||
*/
|
||||
protected async canUserRestore() {
|
||||
const featureFlagEnabled = await firstValueFrom(this.limitItemDeletion$);
|
||||
return this.isTrashFilter && this.cipher?.isDeleted && featureFlagEnabled
|
||||
? this.cipher?.permissions.restore
|
||||
: this.canDelete;
|
||||
if (await firstValueFrom(this.limitItemDeletion$)) {
|
||||
return this.isTrashFilter && this.cipher?.isDeleted && this.cipher?.permissions.restore;
|
||||
}
|
||||
return this.isTrashFilter && this.cipher?.isDeleted && this.canDelete;
|
||||
}
|
||||
|
||||
protected showRestore: boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user