server icon indicating copy to clipboard operation
server copied to clipboard

[AC-1817] Remove AccessAll logic from miscellaneous sprocs

Open eliykat opened this issue 2 years ago • 1 comments

Type of change

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

Objective

Continue to remove AccessAll logic in sprocs. This is a misc. grouping of sprocs that was left over after my last PRs.

Code changes

The following sprocs have been updated:

Cipher sprocs

  • Cipher_ReadCanEditByIdUserId.sql
  • Cipher_UpdateCollections.sql - in turn called by
    • Cipher_CreateWithCollections
    • Cipher_UpdateWithCollections
    • CipherDetails_CreateWithCollections

Misc sprocs

  • Folder_DeleteById.sql
  • CollectionUser_ReadByOrganizationUserIds.sql
  • OrganizationUserUserDetails_ReadWithCollectionsById.sql

The following sprocs have been deleted:

  • OrganizationUser_ReadWithCollectionsById.sql (this was unused - see comment in migration file for more details)

The corresponding EF queries have also been updated accordingly.

Calling locations are updated to pass in the FlexibleCollections flag value, as in previous PRs.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • 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

eliykat avatar Dec 14 '23 05:12 eliykat

Codecov Report

Attention: 149 lines in your changes are missing coverage. Please review.

Comparison is base (e20f533) 32.02% compared to head (da01a2c) 31.96%.

Files Patch % Lines
...tories/Queries/CipherReadCanEditByIdUserIdQuery.cs 0.00% 57 Missing :warning:
...Console/Repositories/OrganizationUserRepository.cs 0.00% 17 Missing :warning:
...ture.Dapper/Vault/Repositories/CipherRepository.cs 0.00% 16 Missing :warning:
...ture.Dapper/Vault/Repositories/FolderRepository.cs 0.00% 14 Missing :warning:
...Console/Repositories/OrganizationUserRepository.cs 50.00% 10 Missing :warning:
...tyFramework/Vault/Repositories/CipherRepository.cs 0.00% 10 Missing :warning:
...est/Core.Test/Vault/Services/CipherServiceTests.cs 0.00% 10 Missing :warning:
...minConsole/Public/Controllers/MembersController.cs 0.00% 6 Missing :warning:
...Console/Controllers/OrganizationUsersController.cs 0.00% 5 Missing :warning:
...re/Vault/Services/Implementations/CipherService.cs 40.00% 3 Missing :warning:
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3574      +/-   ##
==========================================
- Coverage   32.02%   31.96%   -0.06%     
==========================================
  Files        1197     1197              
  Lines       62974    63069      +95     
  Branches     4802     4812      +10     
==========================================
- Hits        20169    20163       -6     
- Misses      41763    41865     +102     
+ Partials     1042     1041       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 28 '23 01:12 codecov[bot]

No longer required.

eliykat avatar Jul 12 '24 02:07 eliykat