Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AC-2161] update cipher collections org vault modal #8027

Merged
merged 24 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1de7b08
updated collections component and vault component to disable readOnly…
Jingo88 Feb 20, 2024
03491e4
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Feb 20, 2024
69b3ce4
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Feb 23, 2024
8ee593b
update collections component to check if org allows Owners up manage …
Jingo88 Feb 26, 2024
d559a12
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Feb 28, 2024
29d2e53
updated canEditItems logic
Jingo88 Feb 28, 2024
3a960a4
added a canEditItems method to check for flex collection flag, assign…
Jingo88 Feb 28, 2024
f299244
add logic to pass organization so canEditItems does not return false …
Jingo88 Feb 29, 2024
0907d7e
updated other collections components with org service import
Jingo88 Feb 29, 2024
325df09
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 7, 2024
f274391
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 11, 2024
4038744
add logic for unassigned items in saveCollections of org vault collec…
Jingo88 Mar 12, 2024
86457a6
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 12, 2024
cab9613
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 13, 2024
9f955c7
update loadCipher method in collections component org vault to target…
Jingo88 Mar 13, 2024
6f8f2e3
add canEditAllCiphers logic to submit in collections component so we …
Jingo88 Mar 13, 2024
da4264f
cleanup excess code in collectiosn component. remove filter in vaultE…
Jingo88 Mar 14, 2024
e1ba2de
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 15, 2024
18263dd
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 18, 2024
b4d0f09
change collections value in editCipherCollections for FC Flag off so …
Jingo88 Mar 18, 2024
7b538cb
check for unassigned ciphers added to org vault load method
Jingo88 Mar 19, 2024
db42343
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 19, 2024
36f5c43
latest main. update collections component with missing await
Jingo88 Mar 19, 2024
a744ade
Merge branch 'main' into AC-2161-Update-Cipher-Collections
Jingo88 Mar 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h3>{{ "collections" | i18n }}</h3>
[(ngModel)]="$any(c).checked"
name="Collection[{{ i }}].Checked"
appStopProp
[disabled]="c.readOnly"
/>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}

check(c: CollectionView, select?: boolean) {
if (c.readOnly) {
return;

Check warning on line 32 in apps/web/src/app/vault/individual-vault/collections.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/individual-vault/collections.component.ts#L32

Added line #L32 was not covered by tests
}
(c as any).checked = select == null ? !(c as any).checked : select;
}

Expand Down
9 changes: 9 additions & 0 deletions apps/web/src/app/vault/org-vault/vault.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {

Check notice on line 1 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.74 to 5.89, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
ChangeDetectorRef,
Component,
NgZone,
Expand Down Expand Up @@ -686,6 +686,15 @@
(c) => !c.readOnly && c.id != Unassigned,
shane-melton marked this conversation as resolved.
Show resolved Hide resolved
);
}
collections = collections.sort((a, b) => {

Check warning on line 689 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L689

Added line #L689 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue / question: The collections list here is being filtered above to only show non-readonly collections. I think something unexpected is going on if you're able to get a mix of readonly and non-readonly collections to sort here.

Are you using the v1 flexible collections flag? And/or is the limit admin access to collections/items setting enabled?

if (a.readOnly == null && b.readOnly) {
return -1;

Check warning on line 691 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L691

Added line #L691 was not covered by tests
} else if (a.readOnly && b.readOnly == null) {
return 1;

Check warning on line 693 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L693

Added line #L693 was not covered by tests
} else {
return 0;

Check warning on line 695 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L695

Added line #L695 was not covered by tests
}
});
const [modal] = await this.modalService.openViewRef(
CollectionsComponent,
this.collectionsModalRef,
Expand Down
Loading