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

[SM-923] Migrate Project -> Service Accounts access policy selector #8789

Merged
merged 28 commits into from May 2, 2024

Conversation

Thomas-Avery
Copy link
Contributor

@Thomas-Avery Thomas-Avery commented Apr 17, 2024

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

This purpose of this PR is to migrate the project → service accounts tab to the new access policy selector.

Depends on the server PR bitwarden/server#3993

Code changes

  • bitwarden_license/bit-web/src/app/secrets-manager/models/view/access-policy.view.ts:
    Add view for ProjectServiceAccountsAccessPolicies

  • bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.html:
    bitwarden_license/bit-web/src/app/secrets-manager/projects/project/project-service-accounts.component.ts:
    Migrate to the new access policy selector.

  • bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy-selector/models/ap-item-value.type.ts:
    Add support for converting into the new view.

  • bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy-selector/models/ap-item-view.type.ts:
    Add support for converting from the new view.

  • bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy.service.ts:
    Add calls for the new management endpoints.

  • bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/models/requests/project-service-accounts-access-policies.request.ts:
    Add request model for the new endpoint.

  • bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/models/responses/project-service-accounts-access-policies.response.ts:
    Add response model for the new endpoints.

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
  • Ensure that all UI additions follow WCAG AA requirements

@Thomas-Avery Thomas-Avery self-assigned this Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 96 lines in your changes are missing coverage. Please review.

Project coverage is 27.71%. Comparing base (2698873) to head (7d5c9ec).

Files Patch % Lines
...ects/project/project-service-accounts.component.ts 0.00% 52 Missing ⚠️
...er/shared/access-policies/access-policy.service.ts 0.00% 19 Missing ⚠️
...ccess-policy-selector/models/ap-item-value.type.ts 0.00% 11 Missing ⚠️
...oject-service-accounts-access-policies.response.ts 0.00% 7 Missing ⚠️
...access-policy-selector/models/ap-item-view.type.ts 0.00% 5 Missing ⚠️
.../secrets-manager/models/view/access-policy.view.ts 0.00% 1 Missing ⚠️
...roject-service-accounts-access-policies.request.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8789      +/-   ##
==========================================
- Coverage   27.74%   27.71%   -0.03%     
==========================================
  Files        2409     2411       +2     
  Lines       69749    69823      +74     
  Branches    12978    12984       +6     
==========================================
  Hits        19349    19349              
- Misses      48898    48972      +74     
  Partials     1502     1502              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Apr 17, 2024

Logo
Checkmarx One – Scan Summary & Details3736d434-7de9-419c-ad70-4e80c47a65ad

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html: 55 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html: 36 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.html: 59 Attack Vector

@Thomas-Avery Thomas-Avery added the needs-qa Marks a PR as requiring QA approval label Apr 19, 2024
@Thomas-Avery Thomas-Avery marked this pull request as ready for review April 19, 2024 20:27
@Thomas-Avery Thomas-Avery requested a review from a team as a code owner April 19, 2024 20:27
cd-bitwarden
cd-bitwarden previously approved these changes Apr 24, 2024
Copy link
Contributor

@cd-bitwarden cd-bitwarden left a comment

Choose a reason for hiding this comment

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

These changes look good! I did notice that it's automatically noting that some new lines of code aren't covered by tests, are any of these suggestions it's making important or is it overkill on what it's suggesting to test?

Base automatically changed from sm/sm-910 to main May 1, 2024 16:47
@Thomas-Avery Thomas-Avery dismissed cd-bitwarden’s stale review May 1, 2024 16:47

The base branch was changed.

Copy link
Contributor

@cd-bitwarden cd-bitwarden left a comment

Choose a reason for hiding this comment

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

Approved 👍

@Thomas-Avery Thomas-Avery removed the needs-qa Marks a PR as requiring QA approval label May 2, 2024
@Thomas-Avery Thomas-Avery merged commit bdbb16a into main May 2, 2024
17 of 19 checks passed
@Thomas-Avery Thomas-Avery deleted the sm/sm-923 branch May 2, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants