1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 18:23:44 +00:00
Commit Graph

707 Commits

Author SHA1 Message Date
Justin Baur
de2a43e6ca Switch naming convention 2021-11-18 09:30:24 -05:00
Justin Baur
da80a16b9f Remove reconfirmation template 2021-11-18 09:27:46 -05:00
Justin Baur
bff256ec6b Remove ending email 2021-11-18 09:26:42 -05:00
Justin Baur
1a1ad081ec Switch to handlebars ifs 2021-11-18 09:22:50 -05:00
Justin Baur
1c9908afc8 Merge branch 'master' into feature/families-for-enterprise 2021-11-18 08:32:28 -05:00
Justin Baur
b0760b2134 Finish emails 2021-11-17 22:06:49 -05:00
Thomas Rittson
9f96e4ce90 Disable EA Takeover if grantor uses Key Connector (#1718) 2021-11-18 07:47:43 +10:00
Oscar Hinton
f866b25e43 Key Connector feature toggle (#1716) 2021-11-17 11:46:35 +01:00
Justin Baur
afa53fcccd Update emails 2021-11-15 14:34:12 -05:00
Thomas Rittson
c2975b003d [Key Connector] Fix policy checks and other pre-reqs (#1711)
* Require SSO Policy to enable Key Connector

* Require that SSO is enabled to use Key Connector

* Fix error messages

"Key Connector" instead of "KeyConnector"

* Refactor dependent policy checks to handle expansion

* Block disabling Sso Policy if using Key Connector

* Update tests for policies required by Key Connector

* Fix tests

* Add test for Key Connector to require Sso Policy

* Add test: Sso config must be enabled to use Key Connector
2021-11-15 19:25:10 +10:00
Justin Baur
252b558fe1 Merge branch 'master' into feature/families-for-enterprise 2021-11-12 22:33:58 -05:00
Matt Gibson
c70195c882 Test org sponsorship service 2021-11-12 20:49:00 -05:00
Matt Gibson
1d34c276e7 Add sponsorship validation to upcoming invoice webhook 2021-11-12 20:49:00 -05:00
Matt Gibson
be6ab1883c Add is sponsored item to subscription response 2021-11-12 20:49:00 -05:00
Matt Gibson
de5a0cb463 Fix double email send 2021-11-12 20:49:00 -05:00
Matt Gibson
32333048b4 Add resend sponsorship offer api endpoint 2021-11-12 20:49:00 -05:00
Matt Gibson
9ec8bbb8bb Use upgrade path to change sponsorship
Sponsorships need to be annual to match the GB add-on charge rate
2021-11-12 20:49:00 -05:00
Matt Gibson
a2467ea6ea Add product type to organization details 2021-11-12 20:49:00 -05:00
Matt Gibson
1b933769db Simplify names of f4e mail messages 2021-11-12 20:49:00 -05:00
Matt Gibson
094de41c0e Send f4e offer email 2021-11-12 20:48:59 -05:00
Matt Gibson
8480379e32 Use userId to find org users 2021-11-12 20:48:59 -05:00
Matt Gibson
1516b9dd8e Add sponsorship service to DI 2021-11-12 20:48:59 -05:00
Matt Gibson
45f6ec1781 Families for enterprise/stripe integrations (#1699)
* Add PlanSponsorshipType to static store

* Add sponsorship type to token and creates sponsorship

* PascalCase properties

* Require sponsorship for remove

* Create subscription sponsorship helper class

* Handle Sponsored subscription changes

* Add sponsorship id to subscription metadata

* Make sponsoring references nullable

This state indicates that a sponsorship has lapsed, but was not able to
be reverted for billing reasons

* WIP: Validate and remove subscriptions

* Update sponsorships on organization and org user delete

* Add friendly name to organization sponsorship
2021-11-12 20:48:59 -05:00
Justin Baur
143be4273b Initial scaffolding of emails (#1686)
* Initial scaffolding of emails

* Work on adding models for FamilyForEnterprise emails

* Switch verbage

* Put preliminary copy in emails

* Skip test
2021-11-12 20:48:59 -05:00
Matt Gibson
77bea5755e Add PlanSponsorshipType to db model 2021-11-12 20:48:59 -05:00
Matt Gibson
1b6d1b52a3 Create sponsorship offer (#1688) 2021-11-12 20:48:59 -05:00
Matt Gibson
0d9c0bdaea WIP: scaffolding for families for enterprise sponsorship flow 2021-11-12 20:48:59 -05:00
Matt Gibson
fcbf0f094e WIP: Organization sponsorship flow 2021-11-12 20:48:59 -05:00
Oscar Hinton
f1c41257b3 Allow disabling key connector if no user is enrolled (#1712) 2021-11-12 14:38:31 +01:00
Kyle Spearrin
2f0638ce8c sanitize notification hub tag inputs (#1697) 2021-11-09 11:25:18 -05:00
Oscar Hinton
fd37cb5a12 Add support for Key Connector OTP and account migration (#1663)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2021-11-09 16:37:32 +01:00
Kyle Spearrin
7cc7b84eaf use fixed-time comparison of secrets (#1698) 2021-11-08 15:55:42 -05:00
Oscar Hinton
1aa25f2712 Add checks for vault timeout policy (#1694) 2021-11-08 14:37:40 +01:00
Matt Gibson
8f0115e62f Check canScale when scaling for sso (#1661)
* Check canScale when scaling for sso

* PR review

Use AutoAddSeats to add seats in a consistent way.
This requires moving user check out of that method.

* User logic moved out of method
2021-10-25 10:19:37 -05:00
Oscar Hinton
c5d5601464 Add support for crypto agent (#1623) 2021-10-25 15:09:14 +02:00
Matt Gibson
18006591fc Add autoscale to SSO auto provision (#1642) 2021-10-19 07:00:44 -05:00
Matt Gibson
5a2d988375 Correct seat counts (#1621) 2021-10-07 08:05:02 -05:00
Oscar Hinton
79447b6671 Remove Business Portal (#1614) 2021-10-06 10:39:13 +02:00
Matt Gibson
9de9be8f20 Only test canScale is an org needs to scale for an invite (#1608) 2021-09-28 15:18:44 -05:00
Oscar Hinton
63c8070b01 Add Stripe Adapter and IBraintreeGateway to DI (#1596) 2021-09-27 23:01:13 +02:00
Thomas Rittson
66629b2f1c Refactor policy checks (#1536)
* Move policy checking logic inside PolicyService

* Refactor to use currentContext.ManagePolicies

* Make orgUser status check more semantic

* Fix single org user checks

* Use CoreHelper implementation to deserialize json

* Refactor policy checks to use db query

* Use new db query for enforcing 2FA Policy

* Add Policy_ReadByTypeApplicableToUser

* Stub out EF implementations

* Refactor: use PolicyRepository only

* Refactor tests

* Copy SQL queries to proj and update sqlproj file

* Refactor importCiphersAsync to use new method

* Add EF implementations and tests

* Refactor SQL to remove unnecessary operations
2021-09-28 06:54:28 +10:00
Matt Gibson
3d74f514ad Early return zero or negative amount invoices (#1595)
Stripe handles these by immediately finalizing as paid and crediting
their account the appropriate amount.
2021-09-27 09:20:47 -05:00
Matt Gibson
d39f45c81c Organization autoscaling (#1585)
* Add autoscale fields to Organization

* Add autoscale setting changes

* Autoscale organizations

updates InviteUsersAsync to support all invite sources.

sends an email to org owners when organization autoscaled

* All organizations autoscale

Disabling autoscaling can be done by setting max seats to current seats.

We only warn about autoscaling on the first autoscaling event.

* Fix tests

* Bug fixes

* Simplify subscription update logic

* Void invoices that fail to delete

Stripe no longer allows deletion of draft invoices that were created as part of subscription updates. It's necessary to void out these invoices without sending tem to the client.

* Notify org owners when their subscription runs out of seats

* Use datetime for notifications

Allows for later re-sending email if we want to periodically remind
owners

* Do not update subscription if it already matches new quatity

* Include all migrations

* Remove unnecessary inline styling

* SubscriptionUpdate handles update decisions

* Remove unnecessary html setter

* PR review

* Use minimum access for class methods
2021-09-23 05:36:08 -05:00
Oscar Hinton
c22e48c1b4 Resolve error when deleting an account connected to a provider (#1580) 2021-09-15 20:34:06 +02:00
Matt Gibson
97b27220dd Use invoice to pay if subscription set to invoice (#1571)
* Use invoice to pay if subscription set to invoice

* Apply suggestions from code review

Co-authored-by: Addison Beck <abeck@bitwarden.com>

* PR review

Move to subscriber model for subscription updates.

Co-authored-by: Addison Beck <abeck@bitwarden.com>
2021-09-14 08:18:06 -05:00
Joseph Flinn
d07a68e3cc Add configuration support for QA cloud environment (#1572)
* Adding a QA environment specific configuration

* separating the bitwarden environment and stripe environment checks

* adding a logging statement for the PayPal webhook key check

* adding more logging

* switched logging type

* Changing the log level on the PayPal webhook. Removing the debugging log from the Stripe Controller
2021-09-08 13:09:54 -07:00
Thomas Rittson
01f0b6184f Enforce Personal Ownership policy when importing (#1565) 2021-09-08 07:20:05 +10:00
Matt Gibson
db0ef226c4 Fix stripe invoice time on seat adjust (#1564)
* Finalize and void subscription updates

Stripe does not allow deletion of invoices created as subscription updates.
Instead, finalize it and void it out without sending to the customer.

* Store and Restore invoice days until due

Currently, we're overwriting customer invoice lead times whenever they
attempt to update their seat count. Changes are now updated to previous
behavior after our seat adjustment work

* PR Comments
2021-09-03 08:55:29 -05:00
Vincent Salucci
f2520ed7be [Reset Password] Enable force password reset (#1557) 2021-08-31 14:23:06 -05:00
Thomas Rittson
e1908cd6b5 Add support for international domain names (IDN) in email addresses (#1512)
* Adjust email address checking to handle unicode

* ASCII only in local part
* allow unicode in second-level and top-level domain

* Add PunyEncoding/Decoding methods and tests

* Use PunyEncoding for outbound email recipients

* Use MailKit for punycode, handle edge cases

* Punyencode all email addresses in mailServices

* Remove punyencoding from HandlebarsMailService

* Add to punyencoding tests

* Use more inclusive e-mail error

* Fix comment wording

* Apply StrictEmail checking to emergency access invite

* Remove punyDecode helper
2021-08-31 13:49:11 +10:00