* 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.
* Add SQL files
* Add SQL Server migration
* Add Core entity
* Add Dapper repository
* Add EF repository
* Add EF migrations
* Save OrganizationInstallation during GetLicense invocation
* Run dotnet format
* Revert "[PM-6201] Fix creation of organizations no longer working after merging #5130 (#5142)"
This reverts commit 64573d01a3.
* Revert "[PM-6201] Self-Host Admin Portal is reporting "10239 GB of Additional… (#5130)"
This reverts commit 674e522843.
* Implement UserLeaveAsync in IRemoveOrganizationUserCommand and refactor OrganizationsController to use it
* Edit summary message for IRemoveOrganizationUserCommand.UserLeaveAsync
* Refactor RemoveOrganizationUserCommand.RemoveUsersAsync to log in bulk
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* Revoking users when enabling single org and 2fa policies. Fixing tests.
* Added migration.
* Wrote tests and fixed bugs found.
* Patch build process
* Fixing tests.
* Added unit test around disabling the feature flag.
* Updated error message to be public and added test for validating the request.
* formatting
* Added some tests for single org policy validator.
* Fix issues from merge.
* Added sending emails to revoked non-compliant users.
* Fixing name. Adding two factor policy email.
* Send email when user has been revoked.
* Correcting migration name.
* Fixing templates and logic issue in Revoke command.
* Moving interface into its own file.
* Correcting namespaces for email templates.
* correcting logic that would not allow normal users to revoke non owners.
* Actually correcting the test and logic.
* dotnet format. Added exec to bottom of bulk sproc
* Update src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/RevokeNonCompliantOrganizationUserCommand.cs
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
* Updated OrgIds to be a json string
* Fixing errors.
* Updating test
* Moving command result.
* Formatting and request rename
* Realized this would throw a null error from the system domain verification. Adding unknown type to event system user. Adding optional parameter to SaveAsync in policy service in order to pass in event system user.
* Code review changes
* Removing todos
* Corrected test name.
* Syncing filename to record name.
* Fixing up the tests.
* Added happy path test
* Naming corrections. And corrected EF query.
* added check against event service
* Code review changes.
* Fixing tests.
* splitting up tests
* Added templates and email side effect for claiming a domain.
* bringing changes from nc user changes.
* Switched to enqueue mail message.
* Filled in DomainClaimedByOrganization.html.hbs
* Added text document for domain claiming
* Fixing migration script.
* Remove old sproc
* Limiting sending of the email down to users who are a part of the domain being claimed.
* Added test for change
* Renames and fixed up email.
* Fixing up CSS
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
* Added the ability to create a JWT on an organization license that contains all license properties as claims
* Added the ability to create a JWT on a user license that contains all license properties as claims
* Added ability to consume JWT licenses
* Resolved generic type issues when getting claim value
* Now validating the jwt signature, exp, and iat
* Moved creation of ClaimsPrincipal outside of licenses given dependecy on cert
* Ran dotnet format. Resolved identity error
* Updated claim types to use string constants
* Updated jwt expires to be one year
* Fixed bug requiring email verification to be on the token
* dotnet format
* Patch build process
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>