* Create organization deletion command with logic extracted from OrganizationService
* Add unit tests for OrganizationDeleteCommand
* Register OrganizationDeleteCommand for dependency injection
* Refactor organization deletion logic to use IOrganizationDeleteCommand and remove legacy IOrganizationService.DeleteAsync method
* Add organization deletion initiation command and refactor service usage
* Enhance organization deletion commands with detailed XML documentation
* Refactor organization command registration to include sign-up and deletion methods
* PM-16261 move ImportCiphersAsync to the tools team and create services using CQRS design pattern
* PM-16261 fix renaming methods and add unit tests for succes and bad request exception
* PM-16261 clean up old code from test
* Enforce free organization limit when updating user
* Add test for throwing error on accepting admin user joining multiple free organizations
* Add test for throwing BadRequest when free organization admin attempts to sign up for another free organization
* Fix user ID handling in UpdateOrganizationUserCommand for free organizations
* Rename parameter 'user' to 'organizationUser' in UpdateUserAsync method for clarity
* kdf defaults on null map to email hash
* cleanup code. add some randomness as well
* remove null check
* fix test
* move to private method
* remove random options
* tests for random defaults
* SetDefaultKdfHmacKey for old test
* Fix two-factor authentication revocation logic and update related tests
* Refine test for RevokeNonCompliantOrganizationUserCommand to assert single user revocation
* feat(NewDeviceVerification) :
- Added constant to constants in Bit.Core because the cache key format needs to be shared between the Identity Server and the MVC project Admin.
- Updated DeviceValidator class to handle checking cache for user information to allow pass through.
- Updated and Added tests to handle new flow.
- Adding exception flow to admin project. Added tests for new methods in UserService.
* Repeating pattern values for BitAutoData attribute
* nullable enabled, added documentation
* execute test method even if no repeating pattern data provided (empty array).
* RepeatingPatternBitAutoDataAttribute unit tests
feat(NewDeviceVerification) :
* Created database migration scripts for VerifyDevices column in [dbo].[User].
* Updated DeviceValidator to check if user has opted out of device verification.
* Added endpoint to AccountsController.cs to allow editing of new User.VerifyDevices property.
* Added tests for new methods and endpoint.
* Updating queries to track [dbo].[User].[VerifyDevices].
* Updated DeviceValidator to set `User.EmailVerified` property during the New Device Verification flow.
fix(auth): [PM-2996] Add Pending Auth Request Data to Devices Response
- New stored procedure to fetch the appropriate data.
- Updated devices controller to respond with the new data.
- Tests written at the controller and repository level.
Resolves PM-2996
* chore: set up a `CODEOWNERS` space for platform
* chore: move sql objects for `Installation` to platform's domain
* chore: move `Installation` and `PushRelay` code to platform's domain
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
* PM-10563: Notification Center API
* PM-10563: continuation token hack
* PM-10563: Resolving merge conflicts
* PM-10563: Unit Tests
* PM-10563: Paging simplification by page number and size in database
* PM-10563: Request validation
* PM-10563: Read, Deleted status filters change
* PM-10563: Plural name for tests
* PM-10563: Request validation to always for int type
* PM-10563: Continuation Token returns null on response when no more records available
* PM-10563: Integration tests for GET
* PM-10563: Mark notification read, deleted commands date typos fix
* PM-10563: Integration tests for PATCH read, deleted
* PM-10563: Request, Response models tests
* PM-10563: EditorConfig compliance
* PM-10563: Extracting to const
* PM-10563: Update db migration script date
* PM-10563: Update migration script date
feat(NewDeviceVerification) :
Added constat for the cache key in Bit.Core because the cache key format needs to be shared between the Identity Server and the MVC Admin project.
Updated DeviceValidator class to handle checking cache for user information to allow pass through.
Updated and Added tests to handle new flow.
* Add JSON-based stored procedure for updating account revision dates and modify existing procedure to use it
* Refactor SingleOrgPolicyValidator to revoke only non-compliant organization users and update related tests
* Add new RegenerateUserAsymmetricKeysCommand
* add new command tests
* Add regen controller
* Add regen controller tests
* add feature flag
* Add push notification to sync new asymmetric keys to other devices
feat(NewDeviceVerification): Added a resend new device OTP endpoint and method for the IUserService as well as wrote test for new methods for the user service.
* Added CQRS pattern
* Added the GetManyByUserIdAsync signature to the repositiory
* Added sql sproc
Created user defined type to hold status
Created migration file
* Added ef core query
* Added absract and concrete implementation for GetManyByUserIdStatusAsync
* Added integration tests
* Updated params to status
* Implemented new query to utilize repository method
* Added controller for the security task endpoint
* Fixed lint issues
* Added documentation
* simplified to require single status
modified script to check for users with edit rights
* Updated ef core query
* Added new assertions
* simplified to require single status
* fixed formatting
* Fixed sql script
* Removed default null
* Added OperationAuthorizationRequirement for secruity task
* Added and registered MarkTaskAsCompletedCommand
* Added unit tests for the command
* Added complete endpoint
* removed false value
* Added CQRS pattern
* Added the GetManyByUserIdAsync signature to the repositiory
* Added sql sproc
Created user defined type to hold status
Created migration file
* Added ef core query
* Added absract and concrete implementation for GetManyByUserIdStatusAsync
* Added integration tests
* Updated params to status
* Implemented new query to utilize repository method
* Added controller for the security task endpoint
* Fixed lint issues
* Added documentation
* simplified to require single status
modified script to check for users with edit rights
* Updated ef core query
* Added new assertions
* simplified to require single status
* fixed formatting
* Fixed sql script
* Removed default null
* Added security tasks feature flag
* feat(BaseRequestValidator):
Add global setting for new device verification.
Refactor BaseRequestValidator enabling better self-documenting code and better single responsibility principle for validators.
Updated DeviceValidator to handle new device verification, behind a feature flag.
Moved IDeviceValidator interface to separate file.
Updated CustomRequestValidator to act as the conduit by which *Validators communicate authentication context between themselves and the RequestValidators.
Adding new test for DeviceValidator class.
Updated tests for BaseRequestValidator as some functionality was moved to the DeviceValidator class.
GetByToken and GetMasterPasswordPolicy endpoints provide policy information, so if the organization is not using policies, then we avoid the rest of the logic.