1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

Ps 976 moving of read only organization collection items to different folder not possible (#3474)

* PS-976 - when user has cipher readonly permissions, prevent user from editing cipher fields and make separate api call that only updates Favorite and Folder values

* PS-976 - in the readonly edit cipher view, hide non-operable buttons and display select values as readonly input text

* PS-976 - update failing test

* PS-976 - split cipher saveWithServer call into Create and Update calls

* PS-976 - replace property with function call to get the card expiration month for the readonly view

* MM-976 - when user has readonly permissions hide "delete" button on View Item view, hide generate username/password buttons on Edit Item view

* PS-976 - rename cipherPartialRequest file to align with new naming convention
This commit is contained in:
dgoodman-bw
2022-10-25 12:24:21 -07:00
committed by GitHub
parent d9542c45d9
commit 41d6b6bd21
19 changed files with 382 additions and 96 deletions

View File

@@ -29,6 +29,7 @@
class="form-control"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
[readonly]="!cipher.edit && editMode"
/>
</div>
<div class="col-7 form-group">
@@ -44,6 +45,7 @@
[(ngModel)]="f.value"
appInputVerbatim
[disabled]="cipher.isDeleted || viewOnly"
[readonly]="!cipher.edit && editMode"
attr.aria-describedby="fieldName{{ i }}"
/>
<div class="input-group-append">
@@ -68,6 +70,7 @@
appInputVerbatim
autocomplete="new-password"
[disabled]="cipher.isDeleted || viewOnly || (!cipher.viewPassword && !f.newField)"
[readonly]="!cipher.edit && editMode"
attr.aria-describedby="fieldName{{ i }}"
/>
<div class="input-group-append">
@@ -130,7 +133,7 @@
class="btn btn-link text-danger ml-2"
(click)="removeField(f)"
appA11yTitle="{{ 'remove' | i18n }}"
*ngIf="!cipher.isDeleted && !viewOnly"
*ngIf="!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)"
>
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true"></i>
</button>
@@ -138,7 +141,7 @@
type="button"
class="btn btn-link text-muted cursor-move"
appA11yTitle="{{ 'dragToSort' | i18n }}"
*ngIf="!cipher.isDeleted && !viewOnly"
*ngIf="!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)"
>
<i class="bwi bwi-hamburger bwi-lg" aria-hidden="true"></i>
</button>
@@ -152,11 +155,11 @@
appStopClick
(click)="addField()"
class="d-inline-block mb-2"
*ngIf="!cipher.isDeleted && !viewOnly"
*ngIf="!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)"
>
<i class="bwi bwi-plus-circle bwi-fw" aria-hidden="true"></i> {{ "newCustomField" | i18n }}
</a>
<div class="row" *ngIf="!cipher.isDeleted && !viewOnly">
<div class="row" *ngIf="!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)">
<div class="col-5">
<label for="addFieldType" class="sr-only">{{ "type" | i18n }}</label>
<select id="addFieldType" class="form-control" name="AddFieldType" [(ngModel)]="addFieldType">