1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
Commit Graph

4742 Commits

Author SHA1 Message Date
Ike
8142ba7bf2
target bootstrap v4.6.2 (#4024) 2024-04-26 17:40:45 -07:00
SmithThe4th
e2d445dd3c
Changed PutCollections response model to return collection ids (#4023) 2024-04-26 16:27:00 -04:00
Rui Tomé
b3e5076128
[AC-1978] Flexible collections: EF data migrations for deprecated permissions (#3969)
* [AC-1682] Added MySql migration and script

(cherry picked from commit d367f6de6b)

* [AC-1682] Added Postgres migration and script

(cherry picked from commit 9bde1604da)

* [AC-1682] Added Sqlite migration and script

(cherry picked from commit 262887f9c3)

* [AC-1682] dotnet format

(cherry picked from commit 00eea0621c)

* [AC-1682] Fixed Sqlite query

(cherry picked from commit 26f5bf8afd)

* [AC-1682] Drop temp tables if they exist when starting the scripts

(cherry picked from commit c20912f95c)

* [AC-1682] Removed MySql transaction from script because EF migration already wraps it under its own transaction

(cherry picked from commit 7b54d78d67)

* [AC-1682] Setting FlexibleCollections = 1 only for Orgs that had data migrated in previous steps

(cherry picked from commit 28bba94d81)

* [AC-1682] Updated queries to check for OrganizationId

(cherry picked from commit a957530d5e)

* [AC-1682] Fixed MySql script

(cherry picked from commit deee483ab7)

* [AC-1682] Fixed Postgres query

(cherry picked from commit c3ca9ec3c8)

* [AC-1682] Fix Sqlite query

(cherry picked from commit fada0a81bf)

* [AC-1682] Reverted scripts back to enabling Flexible Collections to all existing Orgs

(cherry picked from commit bd3b21b969)

* [AC-1682] Removed dropping temporary table from scripts

(cherry picked from commit eb7794d592)

* [AC-1682] Removed other temp table drops

(cherry picked from commit 26768b7bf8)

* [AC-1978] Fix issue that allows the web app to have the user type Manager available

(cherry picked from commit 2890f78870)

* [AC-1682] Bump dates on migration scripts

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-26 14:11:29 +01:00
Rui Tomé
d2abf5b2d7
[AC-2323] Flexible collections: automatically migrate data for all Organizations (#3927)
* [AC-2323] Added script to migrate all sql organizations to use flexible collections

* [AC-2323] Overriding FlexibleCollectionsSignup to true for local usage

* [AC-2323] Fix script comment

* [AC-2323] Fixed typo

* [AC-2323] Bump up date on migration script

* [AC-2323] Bump migration script date

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2024-04-26 14:11:00 +01:00
Alex Morask
186afbc162
Updated CB to use both flag and provider status. (#4005) 2024-04-25 15:27:00 -04:00
Thomas Avery
a7b992d424
[SM-1150] Add secret sync endpoint (#3906)
* Add SecretsSyncQuery

* Add SecretsSync to controller

* Add unit tests

* Add integration tests

* update repo layer
2024-04-25 10:34:08 -05:00
Alex Morask
f7aa56b324
Handle case where Stripe IDs do not relate to Stripe entities (#4021) 2024-04-25 11:07:47 -04:00
renovate[bot]
78b57ba99f
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.81 (#4019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 15:42:53 +02:00
renovate[bot]
be05050e68
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.4.0 (#4020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-25 15:41:18 +02:00
cyprain-okeke
b220de0126
[AC-2312] Server: Update ProviderOrganizationsController.Delete to update provider plan (#4008)
* initial commit

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

* fix the failing unit test

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

* Resolve some pr comments

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

* resolves some pr comments

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

* resolve the collection expression suggestion

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

* resolve pr comments

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

* test for when the flag is on

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

* rename the test

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-25 14:24:14 +01:00
Alex Morask
eac2b9f0b8
[AC-2488] Return default state for billing metadata when Organization has no Stripe entities (#4018)
* Return default state for billing metadata when no stripe entities

* Fix tests
2024-04-25 09:21:05 -04:00
Alex Morask
b12e881ece
[AC-2488] Add billing endpoint to determine SM standalone for organization (#4014)
* Add billing endpoint to determine SM standalone for org.

* Add missing attribute
2024-04-24 16:29:04 -04:00
cyprain-okeke
d3c964887f
[AC-2512] Admin: Seat Minimum input fields are showing for Reseller-type providers (#4013)
* resolve the issue

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

* remove the unused reference

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-24 20:37:21 +01:00
renovate[bot]
9de222d13c
[deps] Auth: Update bootstrap to v5 (#3610)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 12:41:22 -07:00
renovate[bot]
dd3f094f22
[deps] Auth: Update DuoUniversal to v1.2.3 (#3866)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 11:39:52 -07:00
renovate[bot]
1e88adc7fa
[deps] Auth: Update sass to v1.75.0 (#3609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 10:19:30 -07:00
renovate[bot]
8ffc589dd2
[deps] Auth: Update jquery to v3.7.1 (#3608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2024-04-23 09:56:17 -07:00
Kyle Spearrin
3c76f48bdc
Revert "[PM-6977] Migrate to FCM v1 (#3917)" (#4009)
This reverts commit dd8d5955a4.
2024-04-23 13:59:28 +00:00
Kyle Spearrin
dd8d5955a4
[PM-6977] Migrate to FCM v1 (#3917)
* fcmv1 update

* try without nested data obj

* type must be a string

* fcmv1 migration flag

* lint fixes

* fix tests

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-04-23 12:58:35 +01:00
Bitwarden DevOps
a17426c2a8
Bumped version to 2024.4.2 (#4007) 2024-04-23 11:30:41 +00:00
Conner Turnbull
28e8287451
Updated missing logic for 2023 plans (#4000) 2024-04-19 13:15:35 -04:00
Addison Beck
87f710803d
Refactor PolicyService.SaveAsync() (#4001)
* Move dependent policy checks to a dedicated function

* Invert conditional

* Extract enable logic
2024-04-19 10:53:24 -05:00
Alex Morask
821f7620b6
[AC-2461] Scale provider seats on client organization deletion (#3996)
* Scaled provider seats on client organization deletion

* Thomas' feedback
2024-04-19 10:09:18 -04:00
Conner Turnbull
e6bd8779a6
Updated GetIdsByMetadata to support providerId (#3994)
* Refactored the charge succeeded handler a bit

* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one

* Converted else if structure to switch-case

* Moved logic for invoice.upcoming to a private method

* Moved logic for charge.succeeded to a private method

* Moved logic for charge.refunded to a private method

* Moved logic for invoice.payment_succeeded to a private method

* Updated invoice.payment_failed to match the rest

* Updated invoice.created to match the rest with some light refactors

* Added method comment to HandlePaymentMethodAttachedAsync

* Moved logic for customer.updated to a private method

* Updated logger in default case

* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks

* Moved logic for customer.subscription.deleted to a private method

* Moved logic for customer.subscription.updated to a private method

* Merged customer sub updated or deleted to switch

* No longer checking if the user has premium before disabling it since the service already checks

* Moved webhook secret parsing logic to private method

* Moved casting of event to specific object down to handler

* Reduced nesting throughout

* When removing secrets manager, now deleting 100% off password manager discount for SM trials

* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync

* Updated GetIdsByMetadata to support providerId
2024-04-19 09:33:26 -04:00
Conner Turnbull
0171a3150e
[AC-2427] update discount logic for complimentary password manager (#3990)
* Refactored the charge succeeded handler a bit

* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one

* Converted else if structure to switch-case

* Moved logic for invoice.upcoming to a private method

* Moved logic for charge.succeeded to a private method

* Moved logic for charge.refunded to a private method

* Moved logic for invoice.payment_succeeded to a private method

* Updated invoice.payment_failed to match the rest

* Updated invoice.created to match the rest with some light refactors

* Added method comment to HandlePaymentMethodAttachedAsync

* Moved logic for customer.updated to a private method

* Updated logger in default case

* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks

* Moved logic for customer.subscription.deleted to a private method

* Moved logic for customer.subscription.updated to a private method

* Merged customer sub updated or deleted to switch

* No longer checking if the user has premium before disabling it since the service already checks

* Moved webhook secret parsing logic to private method

* Moved casting of event to specific object down to handler

* Reduced nesting throughout

* When removing secrets manager, now deleting 100% off password manager discount for SM trials

* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync
2024-04-19 09:15:48 -04:00
Addison Beck
19a7aa500d
Properly handle new policy enrollments in the public API (#4003)
* Test the use case

* Properly instantiate model from null

* Rename query parameter
2024-04-18 17:04:04 -05:00
Alex Morask
9827ee5f6a
[AC-2420] Fix customer discount ID and SM invite validation (#3966)
* Fix customer discount ID and SM update validation

* Replace constructor needed for autofixture
2024-04-18 11:11:37 -04:00
Colton Hurst
49ed5af517
SM-1179: Rename service accounts to machine accounts (#3974) 2024-04-18 11:01:08 -04:00
Rui Tomé
92716fe319
[PM-3176] Extract IOrganizationService.SaveUserAsync to a command (#3894)
* [PM-3176] Extract IOrganizationService.SaveUserAsync to a command

* [PM-3176] Enabled nullable on command

* [PM-3176] Removed check that was not working
2024-04-18 11:42:30 +01:00
cyprain-okeke
6672019122
[AC-1218] Add ability to delete Provider Portals (#3973)
* add new classes

* initial commit

* revert the changes on this files

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

* revert unnecessary changes

* Add a model

* add the delete token endpoint

* add a unit test for delete provider

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

* add the delete provider method

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

* resolve the failing test

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

* resolve the delete request redirect issue

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

* changes to correct the json issue

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

* resolve errors

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

* resolve pr comment

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

* move ProviderDeleteTokenable to the adminConsole

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

* Add feature flag

* resolve pr comments

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

* add some unit test

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

* resolve the failing test

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

* resolve test

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

* add the remove feature flag

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

* [AC-2378] Added `ProviderId` to PayPal transaction model (#3995)

* Added ProviderId to PayPal transaction model

* Fixed issue with parsing provider id

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* Bumped version to 2024.4.1 (#3997)

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* [AC-1923] Add endpoint to create client organization (#3977)

* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback

* add changes after merge conflict

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

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
Co-authored-by: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
Co-authored-by: Bitwarden DevOps <106330231+bitwarden-devops-bot@users.noreply.github.com>
2024-04-17 10:09:53 +01:00
Bitwarden DevOps
ddbb031bcb
Bumped version to 2024.4.1 (#3997) 2024-04-16 19:22:31 +00:00
Alex Morask
c4ba0dc2a5
[AC-1923] Add endpoint to create client organization (#3977)
* Add new endpoint for creating client organizations in consolidated billing

* Create empty org and then assign seats for code re-use

* Fixes made from debugging client side

* few more small fixes

* Vincent's feedback
2024-04-16 13:55:00 -04:00
Conner Turnbull
73e049f878
[AC-2378] Added ProviderId to PayPal transaction model (#3995)
* Added ProviderId to PayPal transaction model

* Fixed issue with parsing provider id
2024-04-16 17:50:12 +00:00
Thomas Rittson
44412844a0
[AC-2169] Group modal - limit admin access - members tab (#3975)
* Prevent Admins from adding themselves to groups
if they cannot manage all collections and items
2024-04-16 11:39:51 +10:00
MtnBurrit0
122d1b7ed7
Remove ComposeVersion from template (#3972) 2024-04-15 14:38:39 -06:00
renovate[bot]
0512102189
[deps] Tools: Update Handlebars.Net to v2.1.6 (#3982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 16:56:50 +02:00
renovate[bot]
64c239674f
[deps] Tools: Update SignalR to v8.0.4 (#3984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 13:28:19 +02:00
renovate[bot]
b73bcc9e4e
[deps] Tools: Update aws-sdk-net monorepo to v3.7.300.74 (#3985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 13:18:10 +02:00
renovate[bot]
9377f93965
[deps] Tools: Update SendGrid to v9.29.3 (#3983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:36:53 +02:00
renovate[bot]
7d161f0c2b
[deps] Tools: Update LaunchDarkly.ServerSdk to v8.3.0 (#3986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:34:07 +02:00
renovate[bot]
312680b495
[deps] Tools: Update MailKit to v4.5.0 (#3987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 11:29:30 +02:00
Conner Turnbull
6d2b47f036
Removed business name from org edit (#3970) 2024-04-12 10:17:34 -04:00
Thomas Rittson
66f0c4b982
Enable unassigned items banner for self-host (#3978) 2024-04-12 06:40:43 -05:00
cyprain-okeke
736a6f19a5
resolve the issue with changes of payment method (#3976)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-04-11 15:19:28 +01:00
Thomas Rittson
0a43d8335d
Add IntegrationTest project to setup_secrets (#3941) 2024-04-11 11:31:36 +10:00
Alex Morask
3cdfbdb22d
Start subscription for provider during setup process. (#3957) 2024-04-10 14:10:53 -04:00
Thomas Rittson
2c36784cda
[AC-2436] Show unassigned items banner (#3967)
* Add endpoint

* Add feature flag

* Only show banner for flexible collections orgs (to avoid affecting self-host)
2024-04-10 09:06:43 -05:00
Jason Ng
c15574721d
AC-2330 add response to put method for updating cipher collections (#3964)
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
2024-04-09 10:39:26 -04:00
Kyle Spearrin
40221f578f
[PM-6339] Shard notification hub clients across multiple accounts (#3812)
* WIP registration updates

* fix deviceHubs

* addHub inline in ctor

* adjust setttings for hub reg

* send to all clients

* fix multiservice push

* use notification hub type

* feedback

---------

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
2024-04-08 15:39:44 -04:00
Vincent Salucci
de8b7b14b8
feat: generate txt record server-side and remove initial domain verification, refs AC-2350 (#3940) 2024-04-08 14:32:20 -05:00