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-2731] Remove AccessAll - Collection and Cipher functions #4469

Conversation

eliykat
Copy link
Member

@eliykat eliykat commented Jul 5, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/AC-2731

📔 Objective

Remove AccessAll logic from Collection and Cipher functions:

  • ./dbo/Functions/UserCollectionDetails.sql
  • ./Vault/dbo/Functions/UserCipherDetails.sql

These are some of our core functions for syncing the user's vault and should be reviewed carefully.

We'd already made v2 versions of these functions with these changes, but they were mostly unused. Now that the feature is released there's no need to fully switch over to the v2 versions, we can just update the old functions in place to make everything consistent again.

This PR copies the v2 logic (without AccessAll) back to the current functions. We'll drop the v2 sprocs in a later PR.

Note that this does not change the function parameters so there should be no other EDD concerns.

Similar changes are made to the EF queries, permanently switching over to the vNext methods in the corresponding query classes.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@eliykat eliykat requested review from a team as code owners July 5, 2024 03:17
@eliykat eliykat requested a review from Jingo88 July 5, 2024 03:17
Copy link
Member Author

Choose a reason for hiding this comment

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

Migration filename assumes that #4468 will be merged first.

Copy link
Contributor

github-actions bot commented Jul 5, 2024

Logo
Checkmarx One – Scan Summary & Details351fada1-4245-47cf-b669-7430ebcdd3d4

No New Or Fixed Issues Found

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

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

Please upload report for BASE (main@5c1a471). Learn more about missing BASE report.

Files Patch % Lines
...tyFramework/Vault/Repositories/CipherRepository.cs 0.00% 4 Missing ⚠️
...tityFramework/Repositories/CollectionRepository.cs 0.00% 1 Missing ⚠️
...ork/Repositories/Queries/UserCipherDetailsQuery.cs 0.00% 1 Missing ⚠️
...Repositories/Queries/UserCollectionDetailsQuery.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4469   +/-   ##
=======================================
  Coverage        ?   41.34%           
=======================================
  Files           ?     1265           
  Lines           ?    60113           
  Branches        ?     5509           
=======================================
  Hits            ?    24852           
  Misses          ?    34115           
  Partials        ?     1146           

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

Copy link
Contributor

@rkac-bw rkac-bw left a comment

Choose a reason for hiding this comment

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

lgtm

@eliykat eliykat merged commit 1525c10 into main Jul 9, 2024
52 checks passed
@eliykat eliykat deleted the ac/ac-2731/usercollectiondetails-and-usercipherdetails---remove-accessall branch July 9, 2024 03:50
withinfocus pushed a commit that referenced this pull request Jul 9, 2024
* Remove AccessAll logic from UserCollectionDetails and UserCipherDetails
  and EF equivalents
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

3 participants