1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00
Commit Graph

3758 Commits

Author SHA1 Message Date
renovate[bot]
6cc097ec49
[deps] Platform: Update dotnet monorepo (#4886)
* [deps] Platform: Update dotnet monorepo

* Update patch version on missed monorepo packages

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Addison Beck <github@addisonbeck.com>
2024-10-28 13:35:14 -04:00
Brandon Treston
7f4bde1b6c
[PM-13730] Return Policy object instead of NotFoundException (#4911)
* Return Policy object instead of NotFoundException

* Add unit tests, change orgId type to Guid

* Fix test cases, throw exception when manage not allowed
2024-10-28 12:33:22 -04:00
Rui Tomé
c126fee296
[PM-11405] Account Management: Prevent a verified user from changing their email address (#4875)
* Add check for managed user before purging account

* Rename IOrganizationRepository.GetByClaimedUserDomainAsync to GetByVerifiedUserEmailDomainAsync and refactor to return a list. Remove ManagedByOrganizationId from ProfileResponseMode. Add ManagesActiveUser to ProfileOrganizationResponseModel

* Rename the property ManagesActiveUser to UserIsManagedByOrganization

* Remove whole class #nullable enable and add it to specific places

* [PM-11405] Account Deprovisioning: Prevent a verified user from changing their email address

* Remove unnecessary .ToList()

* Refactor IUserService methods GetOrganizationsManagingUserAsync and IsManagedByAnyOrganizationAsync to not return nullable objects. Update ProfileOrganizationResponseModel.UserIsManagedByOrganization to not be nullable

* Update error message when unable to purge vault for managed account

* Update error message when unable to change email for managed account

* Update expected error messages on unit tests

* Add TestFeatureService to Api.IntegrationTest.Helpers and use it on ApiApplicationFactory to be able to enable specific features for each test

* Add CreateVerifiedDomainAsync method to OrganizationTestHelpers

* Add tests to AccountsControllerTest to prevent changing email for managed accounts

* Remove setting the feature flag value in ApiApplicationFactory and set it on AccountsControllerTest

* Remove TestFeatureService class from Api.IntegrationTest.Helpers
2024-10-28 16:12:13 +00:00
renovate[bot]
cc6e41b42a
[deps] DbOps: Update Microsoft.Azure.Cosmos to 3.45.0 (#4949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-28 10:29:34 -04:00
renovate[bot]
109ba14cf4
[deps] Tools: Update aws-sdk-net monorepo (#4946)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-28 10:02:40 +01:00
renovate[bot]
e2a69c432c
[deps] Tools: Update LaunchDarkly.ServerSdk to 8.6.0 (#4950)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-28 10:00:33 +01:00
Ike
d0c9953444
[PM-8213] Feature flag for new-device-verification (#4944) 2024-10-26 12:43:27 -04:00
Jonas Hendrickx
53ad9df003
[PM-13451] Update subscription setup process to support MOE providers (#4937) 2024-10-25 03:56:03 +02:00
Thomas Rittson
6272e84c92
Remove feature flag (#4931)
Co-authored-by: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com>
2024-10-25 10:17:28 +10:00
Matt Gibson
f43f59e4b4
Register noop notification registration service for self host lacking necessary data (#4939) 2024-10-24 15:45:13 -04:00
Ike
c028c68d9c
[PM-6666] Two factor Validator refactor (#4894)
* initial device removal

* Unit Testing

* Finalized tests

* initial commit refactoring two factor

* initial tests

* Unit Tests

* initial device removal

* Unit Testing

* Finalized tests

* initial commit refactoring two factor

* initial tests

* Unit Tests

* Fixing some tests

* renaming and reorganizing

* refactored two factor flows

* fixed a possible issue with object mapping.

* Update TwoFactorAuthenticationValidator.cs

removed unused code
2024-10-24 10:41:25 -07:00
Jared McCannon
0c346d6070
[PM-10314] Auto-enable Single Org when a Domain is Verified (#4897)
Updated domain verification to auto-enable single org policy.
2024-10-24 10:13:45 -05:00
Rui Tomé
a128cf1506
[PM-12758] Add managed status to OrganizationUserDetailsResponseModel and OrganizationUserUserDetailsResponse (#4918)
* Refactor OrganizationUsersController.Get to include organization management status of organization users in details endpoint

* Refactor OrganizationUsersController.Get to include organization management status of an individual user in details endpoint

* Remove redundant .ToDictionary()

* Simpify the property xmldoc

* Name tuple variables in OrganizationUsersController.Get

* Name returned tuple objects in GetDetailsByIdWithCollectionsAsync method in OrganizationUserRepository

* Refactor MembersController.Get to destructure tuple returned by GetDetailsByIdWithCollectionsAsync

* Add test for OrganizationUsersController.Get to assert ManagedByOrganization is set accordingly
2024-10-24 15:39:35 +01:00
Thomas Rittson
4a1b90db48
Remove bulk-device-approval feature flag definition (#4930) 2024-10-24 08:09:07 +10:00
Jared Snider
e6245bbece
Auth/PM-12613 - Registration with Email Verification - Provider Invite Flow (#4917)
* PM-12613 - Add RegisterUserViaProviderInviteToken flow (needs manual, unit, and integration tests)

* PM-12613 - RegisterUserCommandTests - test register via provider inv

* PM-12613 - AccountsControllerTests.cs - Add integration test for provider

* PM-12613 - Remove comment

* PM-12613 - Add temp logging to help debug integration test failure in pipeline

* PM-12613 - WebApplicationFactoryBase.cs - add ConfigureServices

* PM-12613 - AccountsControllerTests.cs - refactor test to sidestep encryption

* PM-12613 - Per PR feedback, refactor AccountsController.cs and move token type checking into request model.

* PM-12613 - Remove debug writelines

* PM-12613 - Add RegisterFinishRequestModelTests
2024-10-23 18:06:24 -04:00
Jonas Hendrickx
a952d10637
[PM-13447] Add Multi Org Enterprise providers to Admin Console (#4920) 2024-10-23 12:10:50 -04:00
Daniel James Smith
39c560bbdd
Add generator-tools-modernization feature flag (#4933)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-10-23 12:01:23 -04:00
Matt Gibson
f44a59f7a9
Shard notification hub (#4450)
* Allow for binning of comb IDs by date and value

* Introduce notification hub pool

* Replace device type sharding with comb + range sharding

* Fix proxy interface

* Use enumerable services for multiServiceNotificationHub

* Fix push interface usage

* Fix push notification service dependencies

* Fix push notification keys

* Fixup documentation

* Remove deprecated settings

* Fix tests

* PascalCase method names

* Remove unused request model properties

* Remove unused setting

* Improve DateFromComb precision

* Prefer readonly service enumerable

* Pascal case template holes

* Name TryParse methods TryParse

* Apply suggestions from code review

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* AllClients is a set of clients and must be deduplicated

* Fix registration start time

* Add logging to initialization of a notification hub

* more logging

* Add lower level logging for hub settings

* Log when connection is resolved

* Improve log message

* Log pushes to notification hub

* temporarily elevate log messages for visibility

* Log in multi-service when relaying to another push service

* Revert to more reasonable logging free of user information

* Fixup merge

Deleting user was extracted to a command in #4803, this updates that work to use just the device ids as I did elsewhere in abd67e8ec

* Do not use bouncy castle exception types

* Add required services for logging

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2024-10-22 12:20:57 -04:00
Rui Tomé
7b5e0e4a64
[PM-13836] Refactor IPolicyService to remove unnecessary IOrganizationService dependency (#4914) 2024-10-22 10:38:01 +01:00
Thomas Rittson
dfa411131d
[PM-13322] [BEEEP] Add PolicyValidators and refactor policy save logic (#4877) 2024-10-22 09:18:34 +10:00
Alex Morask
a2109175b0
Add self-host eligibility to organization metadata (#4867) 2024-10-21 14:02:21 -04:00
Thomas Avery
2c4dd3ea12
Fix swap notification commands to use UtcNow (#4919) 2024-10-21 12:10:03 -05:00
Jonas Hendrickx
f82c0e3742
[PM-10703] Admin Portal Selecting Families plan does not check default features (#4859) 2024-10-21 17:57:18 +02:00
Alex Morask
f61a017c17
[PM-13834] Skip providers that have no clients during migration (#4913)
* Skip providers that have no clients during migration

* Remove enabled requirement from migrator
2024-10-21 08:54:15 -04:00
Alex Morask
5d15750b80
[PM-13717] Fix legacy credit rebate for migrated MSPs (#4906)
* Fix legacy credit rebate for migrated MSPs

* Run dotnet format
2024-10-21 08:54:06 -04:00
rkac-bw
27760bd190
[PM-13843] Optimize collectioncipher readbyuserid (#4916)
* Optimise stored procedure Collectioncipher_ReadByUserId

* Optimise stored procedure Collectioncipher_ReadByUserId

* Optimise stored procedure Collectioncipher_ReadByUserId
2024-10-18 11:28:31 -06:00
Addison Beck
91409a45f0
Split Organization.LimitCollectionCreationDeletion into two separate business rules (#4730)
* Add feature flag

* Promoted the new Entiy Framework properties

* Deprecate the old property

* Update references

* Fix mispelling

* Re-add contextual comment regarding dropped license properties

* Add back deleted assertion for deprecated property

* Add back removed fixture property assignment

* Improve feature toggling scenerios for self hosted org creation/update

* Unblock `PutCollectionManagement` for self host

* Simplify logic of a couple of conditionals

* Feature toggle route unblocking

* Adjust logic collection creation/deletion authorization handler

* Create tests

* Fix bug caught by tests

* Fix bugs caught during manual testing

* Remove remark about license
2024-10-18 11:00:01 -04:00
Jared McCannon
4fec7cadb7
[PM-13722] Refactor ValidateOrganizationsDomainAsync (#4905)
Refactored ValidateOrganizationsDomainAsync to use VerifyOrganizationDomainAsync
2024-10-18 07:45:34 -05:00
Matt Bishop
1d3188d3f5
Remove unused MessagePack dependency (#4909) 2024-10-17 17:30:54 -04:00
Rui Tomé
d6cd73cfcc
[PM-11404] Account Management: Prevent a verified user from purging their vault (#4853)
* Add check for managed user before purging account

* Rename IOrganizationRepository.GetByClaimedUserDomainAsync to GetByVerifiedUserEmailDomainAsync and refactor to return a list. Remove ManagedByOrganizationId from ProfileResponseMode. Add ManagesActiveUser to ProfileOrganizationResponseModel

* Rename the property ManagesActiveUser to UserIsManagedByOrganization

* Remove whole class #nullable enable and add it to specific places

* Remove unnecessary .ToList()

* Refactor IUserService methods GetOrganizationsManagingUserAsync and IsManagedByAnyOrganizationAsync to not return nullable objects. Update ProfileOrganizationResponseModel.UserIsManagedByOrganization to not be nullable

* Update error message when unable to purge vault for managed account
2024-10-17 16:06:32 +01:00
Thomas Rittson
a587de4226
[PM-13646] Revert disabling policies when org plan is changed
This reverts commit fd8c1aae02.
2024-10-16 17:49:17 +01:00
Rui Tomé
93e49ffe74
[AC-607] Extract IOrganizationService.DeleteUserAsync into IRemoveOrganizationUserCommand (#4803)
* Add HasConfirmedOwnersExceptQuery class, interface and unit tests

* Register IHasConfirmedOwnersExceptQuery for dependency injection

* Replace OrganizationService.HasConfirmedOwnersExceptAsync with HasConfirmedOwnersExceptQuery

* Refactor DeleteManagedOrganizationUserAccountCommand to use IHasConfirmedOwnersExceptQuery

* Fix unit tests

* Extract IOrganizationService.RemoveUserAsync into IRemoveOrganizationUserCommand; Update unit tests

* Extract IOrganizationService.RemoveUsersAsync into IRemoveOrganizationUserCommand; Update unit tests

* Refactor RemoveUserAsync(Guid organizationId, Guid userId) to use ValidateDeleteUser

* Refactor RemoveOrganizationUserCommandTests to use more descriptive method names

* Refactor controller actions to accept Guid directly instead of parsing strings

* Add unit tests for removing OrganizationUser by UserId

* Refactor remove OrganizationUser by UserId method

* Add summary to IHasConfirmedOwnersExceptQuery
2024-10-16 10:33:00 +01:00
renovate[bot]
82f24ba0a5
[deps] Tools: Update aws-sdk-net monorepo (#4887)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-15 14:29:22 +02:00
renovate[bot]
7a5faae496
[deps] Billing: Update swashbuckle-aspnetcore monorepo to 6.8.1 (#4884)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2024-10-15 12:46:29 +01:00
renovate[bot]
80ffc271b2
[deps] DbOps: Update Microsoft.Azure.Cosmos to 3.44.0 (#4889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-14 18:22:13 -04:00
renovate[bot]
7835d80630
[deps] Billing: Update Serilog.AspNetCore to 8.0.3 (#4883)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-14 16:28:53 +01:00
renovate[bot]
1b701688d8
[deps] Billing: Update Serilog.Sinks.SyslogMessages to v4 (#4890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-14 11:25:56 +01:00
renovate[bot]
6f840758e5
[deps] Auth: Lock file maintenance (#4724)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-11 17:09:47 -07:00
renovate[bot]
9c5be222f3
[deps] Auth: Update webpack to v5.95.0 (#4822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-11 15:46:35 -07:00
renovate[bot]
50f2ba88be
[deps] Auth: Update sass-loader to v16.0.2 (#4816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-11 15:28:38 -07:00
renovate[bot]
fde807fd49
[deps] Auth: Update sass to v1.79.5 (#4777)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-10-11 14:03:32 -07:00
Ike
96f697babd
revert to bootstrap 4 (#4879) 2024-10-11 12:23:25 -07:00
Ike
22dd957543
[PM-10742] Pull Device verification into testable service (#4851)
* initial device removal

* Unit Testing

* Added unit tests fixed validator null checks

* Finalized tests

* formatting

* fixed test

* lint

* addressing review notes

* comments
2024-10-10 17:26:17 -07:00
Todd Martin
d4c486e189
[PM-12429] Remove authenticator token flag from business logic on 2FA controller (#4868)
* Removed flag from business logic on 2FA controller

* Linting.
2024-10-09 13:47:14 -04:00
Alex Morask
c4e79ae9e9
Register IDistributedCache in billing (#4872) 2024-10-09 12:51:08 -04:00
Rui Tomé
58c6f09629
[PM-12684] Remove Members Bulk 2FA feature flag logic (#4864) 2024-10-09 15:32:49 +01:00
Todd Martin
6c807d800e
[PM-13317] Add client version log scope (#4869)
* Add client version log scope

* Removed extra dependency.
2024-10-09 10:08:00 -04:00
Conner Turnbull
9d06c7b1e0
Added filter for status when getting invoices (#4866) 2024-10-09 13:00:36 +00:00
Tom
d93524030c
Adding the access intelligence feature flag (#4862) 2024-10-08 16:03:35 +02:00
Jared McCannon
e288ca97a3
[PM-12358] New Verified Organization Domain SSO Detail endpoint (#4838)
* Added /domain/sso/verified to organization controller

* Restricting sproc to only return verified domains if the org has sso. Adding name. corrected route. removed not found exception. Adding the sproc definition to the SQL project
2024-10-07 14:39:57 -05:00
renovate[bot]
a92cc17144
[deps] Vault: Update AngleSharp to v1.1.2 (#4662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2024-10-07 12:33:05 +02:00
renovate[bot]
f89900c3f9
[deps] Vault: Update aspnet-health-checks monorepo (#4132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2024-10-07 12:32:14 +02:00
Jonas Hendrickx
a1e4e47e40
[PM-10961] Cannot delete MSP with apostrophe in name (#4846) 2024-10-06 08:14:02 +02:00
Alex Morask
0496085c39
[AC-2551] Consolidated Billing Migration (#4616)
* Move existing Billing SQL files into dbo folder

I noticed that every other team had a nested dbo folder under their team folder while Billing did not. This change replicates that.

* Add SQL files for ClientOrganizationMigrationRecord table

* Add SQL Server migration for ClientOrganizationMigrationRecord table

* Add ClientOrganizationMigrationRecord entity and repository interface

* Add ClientOrganizationMigrationRecord Dapper repository

* Add ClientOrganizationMigrationRecord EF repository

* Add EF migrations for ClientOrganizationMigrationRecord table

* Implement migration process

* Wire up new Admin tool to migrate providers

* Run dotnet format

* Updated coupon and credit application per product request

* AC-3057-3058: Fix expiration date and enabled from webhook processing

* Run dotnet format

* AC-3059: Fix assigned seats during migration

* Updated AllocatedSeats in the case plan already exists

* Update migration scripts to reflect current date
2024-10-04 10:55:00 -04:00
Maciej Zieniuk
738febf031
PM-11123: Notification Status Details view (#4848)
* PM-11123: Notification Status Details view

* PM-11123: Test Typo

* PM-11123: New line missing

* PM-11123: Delete unnecessary field

* PM-11123: Moved NotificationStatusDetails to Models/Data
2024-10-03 22:13:43 +02:00
Addison Beck
6a51e3b1a9
Split LimitCollectionCreationDeletion into two database columns (#4709)
* Add new columns to `dbo.Organization` & its references

* Feed existing data into new `dbo.Organization` column

* Update Entity Framework database definitions

* Move new EF columns out of the core entity definition

* Generate Entity Framework migrations

* Feed existing data into new `Organization` Entity Framework columns

* Add a where clause to SQL migration
2024-10-03 13:43:54 -04:00
Justin Baur
b196c8bfb9
[PM-13098] Use ILogger.BeginScope For Better Scopes (#4740)
* Use `ILogger.BeginScope` For Better Scopes

* Format

* Remove Behind Feature Flag
2024-10-03 08:30:02 -04:00
Maciej Zieniuk
f3f81deb98
[PM-11123] Service layer for Notification Center (#4741)
* PM-11123: Service layer

* PM-11123: Service layer for Notification Center

* PM-11123: Throw error on unsupported requirement

* PM-11123: Missing await

* PM-11123: Cleanup

* PM-11123: Unit Test coverage

* PM-11123: Flipping the authorization logic to be exact match of fail, formatting

* PM-11123: Async warning

* PM-11123: Using AuthorizeOrThrowAsync, removal of redundant set new id

* PM-11123: UT typo

* PM-11123: UT fix
2024-10-02 19:23:19 +02:00
cyprain-okeke
3d391e858d
Remove the feature flag for delete provider (#4836)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-10-01 21:59:36 +01:00
Rui Tomé
337eedcd2c
[PM-10321/PM-10322] Add Endpoints for Deleting Single and Multiple Organization-Managed Users (#4727)
* Add HasVerifiedDomainsAsync method to IOrganizationDomainService

* Add GetManagedUserIdsByOrganizationIdAsync method to IOrganizationUserRepository and the corresponding queries

* Fix case on the sproc OrganizationUser_ReadManagedIdsByOrganizationId parameter

* Update the EF query to use the Email from the User table

* dotnet format

* Fix IOrganizationDomainService.HasVerifiedDomainsAsync by checking that domains have been Verified and add unit tests

* Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync

* Fix domain queries

* Add OrganizationUserRepository integration tests

* Add summary to IOrganizationDomainService.HasVerifiedDomainsAsync

* chore: Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync to GetManyIdsManagedByOrganizationIdAsync

* Add IsManagedByAnyOrganizationAsync method to IUserRepository

* Add integration tests for UserRepository.IsManagedByAnyOrganizationAsync

* Refactor to IUserService.IsManagedByAnyOrganizationAsync and IOrganizationService.GetUsersOrganizationManagementStatusAsync

* chore: Refactor IsManagedByAnyOrganizationAsync method in UserService

* Refactor IOrganizationService.GetUsersOrganizationManagementStatusAsync to return IDictionary<Guid, bool>

* Extract IOrganizationService.GetUsersOrganizationManagementStatusAsync into a query

* Update comments in OrganizationDomainService to use proper capitalization

* Move OrganizationDomainService to AdminConsole ownership and update namespace

* feat: Add support for organization domains in enterprise plans

* feat: Add HasOrganizationDomains property to OrganizationAbility class

* refactor: Update GetOrganizationUsersManagementStatusQuery to use IApplicationCacheService

* Remove HasOrganizationDomains and use UseSso to check if Organization can have Verified Domains

* Refactor UserService.IsManagedByAnyOrganizationAsync to simply check the UseSso flag

* Add new event types for organization user deletion and voluntary departure

* Add DeleteManagedOrganizationUserAccountCommand to remove user and delete account

* Refactor DeleteManagedOrganizationUserAccountCommand to use orgUser.Id instead of orgUser.UserId.Value

* Add DeleteManagedOrganizationUserAccountCommandTests

* Add an endpoint to the OrganizationUsersController to delete a user account managed by an organization

* Add unit tests for OrganizationUsersController.DeleteAccount

* Add an endpoint to the OrganizationUsersController to bulk delete user accounts managed by an organization

* Add unit tests for OrganizationUsersController.BulkDeleteAccount

* Gate new endpoints behind feature flag

* Remove duplicate migration

* Remove unnecessary _userService.GetProperUserId
2024-10-01 15:45:23 +01:00
Alex Morask
594b2a274d
[PM-7452] Handle PayPal for premium users (#4835)
* Add PremiumUserSale

* Add PremiumUserBillingService

* Integrate into UserService behind FF

* Update invoice.created handler to bill newly created PayPal customers

* Run dotnet format
2024-10-01 09:12:08 -04:00
Jonas Hendrickx
84f7cd262c
[PM-12526] Can Reduce Org's PM seats to be lower than SM seats (#4796) 2024-10-01 11:08:10 +02:00
Thomas Rittson
c94a084c86
[PM-3478] Refactor OrganizationUser api (#4752)
* Add OrganizationUserMiniDetails endpoint, models and authorization
* Restrict access to current OrganizationUserUserDetails endpoint
Both are behind feature flags
2024-10-01 07:14:16 +10:00
renovate[bot]
7368e57b7b
[deps] DbOps: Update Microsoft.Azure.Cosmos to 3.43.1 (#4820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 15:15:05 -04:00
Jared McCannon
81b151b1c0
[PM-12074] - Refactored Index to use UserViewModel (#4797)
* Refactored View and Edit models to have all needed fields.
2024-09-30 13:21:30 -05:00
renovate[bot]
17099ddfc0
[deps] Tools: Update MailKit to 4.8.0 (#4829)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 16:34:57 +02:00
Nick Krantz
7b1edb3d3f
[PM-5450] Add check for admin/org access for events (#4705)
* check to see if the org allows access to collections/ciphers to owners for events

* linter

* add check for organization value before attempting to use it

* refactor logic to check for org abilities

* remove checks for organization abilities

- The previous logic would block events from being collected when a cipher was unassigned

* check for organization when recording an event from owner/admin
2024-09-30 08:59:18 -05:00
renovate[bot]
fa87c827fd
[deps] Tools: Update aws-sdk-net monorepo (#4802)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 13:52:32 +02:00
Jonas Hendrickx
81190c1bdf
PM-11602 | Error toast when expired org attempts to auto scale is unclear (#4746) 2024-09-30 12:35:14 +02:00
renovate[bot]
2e8a621293
[deps] Billing: Update Stripe.net to 45.14.0 (#4825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 07:50:35 +00:00
renovate[bot]
f20f646a7e
[deps] Billing: Update swashbuckle-aspnetcore monorepo to 6.8.0 (#4826)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 09:45:06 +02:00
renovate[bot]
bbcdbd7498
[deps] Billing: Update Braintree to 5.27.0 (#4823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 09:42:20 +02:00
cyprain-okeke
c66879eb89
[PM-8445] Update trial initiation UI (#4712)
* Add the feature flag

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Initial comment

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* changes to subscribe with payment method

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Add new objects

* Implementation for subscription without payment method

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Remove unused codes and classes

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Rename the flag properly

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* remove implementation that is no longer needed

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* revert the changes on some code removal

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the pr comment

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* format the data annotations line breaks

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-09-27 19:39:44 +01:00
Kyle Spearrin
8c8956da37
[PM-12630] support for ping identity SCIM provisioning (#4804)
* support for ping identity SCIM provisioning

* mark ping ip list static
2024-09-26 16:04:27 -04:00
Alex Morask
226f26a715
Remove FF: AC-2828_provider-portal-members-page (#4805) 2024-09-26 13:52:21 -04:00
Alex Morask
1199d72bfd
Handle us_bank_account in charge.succeeded (#4807) 2024-09-26 13:51:49 -04:00
Alex Morask
05247d2525
[PM-12420] Stripe events recovery (#4793)
* Billing: Add event recovery endpoints

* Core: Add InternalBilling to BaseServiceUriSettings

* Admin: Scaffold billing section

* Admin: Scaffold ProcessStripeEvents section

* Admin: Implement event processing

* Run dotnet format
2024-09-26 09:18:21 -04:00
Rui Tomé
3f629e0a5a
[PM-11334] Add managed status to sync data (#4791)
* Refactor UserService to add GetOrganizationManagingUserAsync method to retrive the organization that manages a user

* Refactor SyncController and AccountsController to include ManagedByOrganizationId in profile response
2024-09-26 11:21:51 +01:00
Alex Morask
2e072aebe3
[PM-8445] Allow for organization sales with no payment method for trials (#4800)
* Allow for OrganizationSales with no payment method

* Run dotnet format
2024-09-25 08:55:45 -04:00
Rui Tomé
6514b342fc
[PM-10316] Add Command to Remove User and Delete Data for Organization-Managed Users (#4726)
* Add HasVerifiedDomainsAsync method to IOrganizationDomainService

* Add GetManagedUserIdsByOrganizationIdAsync method to IOrganizationUserRepository and the corresponding queries

* Fix case on the sproc OrganizationUser_ReadManagedIdsByOrganizationId parameter

* Update the EF query to use the Email from the User table

* dotnet format

* Fix IOrganizationDomainService.HasVerifiedDomainsAsync by checking that domains have been Verified and add unit tests

* Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync

* Fix domain queries

* Add OrganizationUserRepository integration tests

* Add summary to IOrganizationDomainService.HasVerifiedDomainsAsync

* chore: Rename IOrganizationUserRepository.GetManagedUserIdsByOrganizationAsync to GetManyIdsManagedByOrganizationIdAsync

* Add IsManagedByAnyOrganizationAsync method to IUserRepository

* Add integration tests for UserRepository.IsManagedByAnyOrganizationAsync

* Refactor to IUserService.IsManagedByAnyOrganizationAsync and IOrganizationService.GetUsersOrganizationManagementStatusAsync

* chore: Refactor IsManagedByAnyOrganizationAsync method in UserService

* Refactor IOrganizationService.GetUsersOrganizationManagementStatusAsync to return IDictionary<Guid, bool>

* Extract IOrganizationService.GetUsersOrganizationManagementStatusAsync into a query

* Update comments in OrganizationDomainService to use proper capitalization

* Move OrganizationDomainService to AdminConsole ownership and update namespace

* feat: Add support for organization domains in enterprise plans

* feat: Add HasOrganizationDomains property to OrganizationAbility class

* refactor: Update GetOrganizationUsersManagementStatusQuery to use IApplicationCacheService

* Remove HasOrganizationDomains and use UseSso to check if Organization can have Verified Domains

* Refactor UserService.IsManagedByAnyOrganizationAsync to simply check the UseSso flag

* Add new event types for organization user deletion and voluntary departure

* Add DeleteManagedOrganizationUserAccountCommand to remove user and delete account

* Refactor DeleteManagedOrganizationUserAccountCommand to use orgUser.Id instead of orgUser.UserId.Value

* Add DeleteManagedOrganizationUserAccountCommandTests

* Remove duplicate sql migration script

* Update DeleteManagedOrganizationUserAccountCommand methods to cover all existing checks on OrganizationService

* Add unit tests for all user checks

* Refactor DeleteManagedOrganizationUserAccountCommand

* Set nullable enable annotation on DeleteManagedOrganizationUserAccountCommand

* Fix possible null reference

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved event logging

* Use UserRepository.GetByIdAsync instead of UserService.GetUserByIdAsync

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved error messages

* Refactor DeleteManagedOrganizationUserAccountCommand.cs for improved event logging, error handling and reduce database calls

* Rename unit tests to correctly describe expected outcome
2024-09-25 11:02:17 +01:00
Todd Martin
42f6112c55
Remove device trust logging controller flag restriction (#4795)
* Removed controller restriction

* Linting.
2024-09-24 16:46:04 -04:00
Matt Bishop
080057c564
Provide client type in LD context (#4798) 2024-09-24 10:18:20 -04:00
Thomas Rittson
f7bc5dfb2e
[PM-10365] Drop OrganizationUser AccessAll (#4701)
* Remove OrganizationUser.AccessAll

* Final database migrations
2024-09-24 16:26:35 +10:00
Maciej Zieniuk
9a5c6fe527
PM-11123: Device Type mapping (#4768)
* PM-11123: Device Type mapping

* PM-11123: Moving ClientType out of NotificationCenter, naming clash with Identity ClientType

* PM-11123: Rename ClientType in ICurrentContext to match the type
2024-09-23 23:02:32 +02:00
Todd Martin
e1bf8a9206
Remove key-rotation-improvements feature flag (#4794) 2024-09-23 11:55:51 -04:00
Alex Morask
fd8c1aae02
Disable policies for organization when plan no longer supports it or policy checkbox is deselected (#4763) 2024-09-23 07:51:36 -04:00
cyprain-okeke
917658520c
[AC-2165] Unable to Link New Plans to a Resale Provider (#4699)
* Changes to make all teams and ent plan visible

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the typeo

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-09-23 09:08:59 +00:00
Thomas Rittson
2384e0b7ef
Add AuthorizeOrThrowAsync extension method (#4790) 2024-09-23 08:45:14 +10:00
keithhubner
ab8c3af685
[PM-6630][INT-188] krb5 to dockerfile and kinit entrypoint (#3841) 2024-09-20 12:15:47 -04:00
Maciej Zieniuk
8a515a3f2b
PM-10560: Adding Cascades back to Notification Center (#4769)
* PM-10560: Adding Cascades back

* PM-10560: Add missing Notification FK with CASCADE

* PM-10560: Delete Notification cascades fix

* PM-10560: Further cascades removal, simplifications

* PM-10560: Cleanup

* PM-10560: Cleanup

* PM-10560: Sql migrations fix

* PM-10560: EF revert
2024-09-20 14:20:15 +02:00
Jared McCannon
03bd47e390
[PM-12324] Add HTML ids to Bitwarden Portal for automated testing (#4789)
* Adding ids to org page in admin portal.

Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2024-09-19 10:57:42 -05:00
renovate[bot]
2150e3752c
[deps] Tools: Update aws-sdk-net monorepo (#4776)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 13:12:11 +02:00
Todd Martin
5c9da2e5ea
[PM-5237] Add new Settings property to config endpoint (#4785)
* Added new Settings property to Config endpoint.

* Linting
2024-09-17 11:38:48 -04:00
Mark Youssef
f72932bf24
Fix incorrect links in welcome emails (#4751) 2024-09-16 14:26:01 -07:00
Colton Hurst
a19fc6a2b0
[SM-1433] Update SM Event Logs (#4759)
* SM-1433: Fix bug using cipherId instead of secretId

* SM-1433: Add secretId and serviceAccountId
2024-09-16 12:30:23 -04:00
cyprain-okeke
459f37a4c6
resolve stripe plan upgrade when payment fails (#4783)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-09-16 15:40:41 +00:00
renovate[bot]
bddc84ceba
[deps] Billing: Update Stripe.net to 45.13.0 (#4778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 11:08:37 -04:00
renovate[bot]
3d1782e491
[deps] DbOps: Update Microsoft.Azure.Cosmos to 3.43.0 (#4779)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 11:07:52 -04:00
Jared McCannon
e5c77d5f90
PM 12001 - Fix Empty User Search 500 (#4770)
* Setting null if user2Fa is empty. Added null check to view as well.

* Not setting the temp data at all if empty.
2024-09-13 12:03:53 -05:00
Jared Snider
fd07de736d
Auth/PM-11969 - Registration with Email Verification - Accept Emergency Access Invite Flow (#4773)
* PM-11969 - Add new logic for registering a user via an AcceptEmergencyAccessInviteToken

* PM-11969 - Unit test new RegisterUserViaAcceptEmergencyAccessInviteToken method.

* PM-11969 - Integration test new method
2024-09-12 19:39:10 -04:00