Commit Graph

69 Commits

Author SHA1 Message Date
d11n
f5d26a1555
Store: Fix missing invitation email when adding new user (#6372)
Fixes #6369, a regression introduced with#6188: Sending invite emails required a flag to be set, which defaulted to false. This fixes the code to explicitely set the flag and also defaults it to true (sending an invite email unless declared otherwise).
2024-11-09 13:55:34 +01:00
Nicolas Dorier
01e12329e9
Remove additional cryptoCode from events (#6277) 2024-10-07 09:37:56 +09:00
Nicolas Dorier
0f93581ff5
Refactor confirmation count tracking (#6215) 2024-09-17 17:28:58 +09:00
d11n
f3d485da53
Invitation process improvements (#6188)
* Server: Make sending email optional when adding user

Closes #6158.

* Generate custom invite token and store it in user blob

Closes btcpayserver/app/#46.

* QR code for user invite

Closes #6157.

* Text fix
2024-09-12 12:31:57 +09:00
Nicolas Dorier
6cc1751924
The Big Cleanup: Refactor BTCPay internals (#5809) 2024-04-04 16:31:04 +09:00
d11n
09dbe44bca
Onboarding: Invite new users on store level (#5719)
* Onboarding: Invite new users

- Separates the user self-registration and invite cases
- Adds invitation email for users created by the admin
- Adds invitation tokens to verify user was invited
- Adds handler action for invite links
- Refactors `UserEventHostedService`
- Fixes #5726.

* Add permissioned form tag helper

* Better way of changing a user's role

* Test fixes
2024-03-19 14:58:33 +01:00
d11n
e43b4ed540
Onboarding: Invite new users (#5714)
* Server Users: More precise message when inviting users

This lets the admin who invited a new user know whether or not an email has been sent. If the SMTP server hasn't been set up, they need to share the invite link with the user.

* Onboarding: Invite new users

- Separates the user self-registration and invite cases
- Adds invitation email for users created by the admin
- Adds invitation tokens to verify user was invited
- Adds handler action for invite links
- Refactors `UserEventHostedService`

* Remove duplicate status message from views that use the wizard layout

* Auto-approve users created by an admin

* Notify admins via email if a new account requires approval

* Update wording

* Fix update user error

* Fix redirect to email confirmation in invite action

* Fix precondition checks after signup

* Improve admin notification

Send notification only if the user does not require email confirmation or when they confirmed their email address. Rationale: We want to inform admins only about qualified users and not annoy them with bot registrations.

* Allow approval alongside resending confirm email

* Use user email in log messages instead of ID

* Prevent unnecessary notification after email confirmation

* Use ApplicationUser type explicitly

* Fix after rebase

* Refactoring: Do not subclass UserRegisteredEvent
2024-02-28 20:43:18 +09:00
d11n
6290b0f3bf
Admins can approve registered users (#5647)
* Users list: Cleanups

* Policies: Flip registration settings

* Policies: Add RequireUserApproval setting

* Add approval to user

* Require approval on login and for API key

* API handling

* AccountController cleanups

* Test fix

* Apply suggestions from code review

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* Add missing imports

* Communicate login requirements to user on account creation

* Add login requirements to basic auth handler

* Cleanups and test fix

* Encapsulate approval logic in user service and log approval changes

* Send follow up "Account approved" email

Closes #5656.

* Add notification for admins

* Fix creating a user via the admin view

* Update list: Unify flags into status column, add approve action

* Adjust "Resend email" wording

* Incorporate feedback from code review

* Remove duplicate test server policy reset

---------

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2024-01-31 14:45:54 +09:00
Andrew Camilleri
d542a61f5a
Fix missing walletchanged event and add storeremoved event (#4676) 2023-02-22 13:13:58 +09:00
Andrew Camilleri
9a24e4ade1
Store Settings feature with own table (#3851)
* Store Settings feature with own table

* fix test

* Include the store settings to StoreRepository, remove caching stuff

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-13 13:36:47 +09:00
Andrew Camilleri
51690b47a3
Transfer Processors (#3476)
* Automated Transfer processors

This PR introduces a few things:
* Payouts can now be directly nested under a store instead of through a pull payment.
* The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded.
* There is a new concept introduced, called "Transfer Processors".  Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle.  BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors.
* The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For  on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing.
*

* fix build

* extract

* remove magic string stuff

* fix error message when scheduling

* Paginate migration

* add payout count to payment method tab

* remove unused var

* add protip

* optimzie payout migration dramatically

* Remove useless double condition

* Fix bunch of warnings

* Remove warning

* Remove warnigns

* Rename to Payout processors

* fix typo

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-24 12:19:34 +09:00
nicolas.dorier
e4d9e3e22e
Do not send email twice for bitpay API, log whether IPN is an ExtendedNotification. (Fix #968) 2022-01-12 00:26:12 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
Nicolas Dorier
ed5b159fb6
Use ArgumentNullException.ThrowIfNull everywhere (#3239) 2021-12-28 17:39:54 +09:00
nicolas.dorier
82649dad39
Do not logs all internal events 2021-11-05 00:09:38 +09:00
nicolas.dorier
0b5d0349d4
Do not fire InvoiceExpired twice if invoice partially paid (Fix #3004) 2021-10-27 19:27:19 +09:00
Andrew Camilleri
6e3d6125c2
Payment Settled Webhook event (#2944)
* Payment Settled Webhook event

resolves #2691

* Move payment methods to payment services
2021-10-05 18:10:41 +09:00
nicolas.dorier
0d70743a47
Do not spam logs with events 2021-05-14 17:17:46 +09:00
Andrew Camilleri
778a0f7e8d
Fix: Lightning Listener not listening on Lightning payment after activating when using lazy payments (#2524) 2021-05-14 17:17:07 +09:00
nicolas.dorier
df79c2cf48
Improve tests of webhooks 2020-11-14 13:39:44 +09:00
nicolas.dorier
c967f91abb
Move some code out of InvoiceNotificationManager into InvoiceEventSaverService 2020-11-06 22:24:02 +09:00
Nicolas Dorier
e45dcf61c4
Merge pull request #1831 from btcpayserver/add-btc-index
Show index of payment address for onchain payments
2020-09-30 18:35:51 +09:00
Kukks
8e8415515d Show index of payment address for onchain payments 2020-09-16 11:49:37 +02:00
Kukks
371b33a2e1 Allow admins to invite new users
* This refactors the email sending so that all the logic related to users and emails are now contained in one location.
* The Reset password screen has been updated from its ugly plain self to use the same layout as the login.
* An admin can now create a new account without specifying a password. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email
* An admin can now create accounts that still require the user to verify their if the setting is enabled from the server settings. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email.
* The above features can be used in conjunction: An email will have to verify their email through a link. Once verified, the user is redirected to setting the password.
* When an email has been verified OR a password has been set, users are now redirected to the login page with the email filled in and a success status message shown instead of a dedicated thank you page.
2020-09-16 08:54:24 +02:00
Kukks
d96bd15b3b
add status and refactor 2020-08-26 21:36:30 +09:00
rockstardev
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
rockstardev
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
nicolas.dorier
51514252b6
Run dotnet format 2020-06-28 17:55:27 +09:00
nicolas.dorier
9070b475ea
Make the NotificationSender more generic 2020-06-15 17:19:02 +09:00
rockstardev
113869bd08 Renaming to BaseNotification 2020-06-14 23:49:08 -05:00
rockstardev
0dab96f0a6 Moving Notification to dedicated Service namespace 2020-06-14 23:49:08 -05:00
rockstardev
07efa87fe5 Refactoring conversion of data to view model, switching to FillViewModel 2020-06-14 23:49:08 -05:00
rockstardev
455ac8786a Explicitly define NotificationType for NewVersionNotification 2020-06-14 23:49:08 -05:00
rockstardev
213e68859e Renaming class file 2020-06-14 23:49:08 -05:00
rockstardev
d1383d78c5 Disconnecting NotificationBase from Event, introducing NotificationSender 2020-06-14 23:49:08 -05:00
rockstardev
8876f1f992 Making NotificationEventBase classes internal to reduce leak 2020-06-14 23:49:08 -05:00
rockstardev
b53cb50a91 Pkzipping Notification blobs to keep with convention 2020-06-14 23:49:08 -05:00
rockstardev
1f35534dfb Providing overridable NotificationType property, direct mapping 2020-06-14 23:49:08 -05:00
rockstardev
afaabd06d9 Abstracting conversion to ViewModel, requiring implementation on class 2020-06-14 23:49:08 -05:00
rockstardev
73588ea22b Generalizing saving to database and registration of NotificationEventBase classes 2020-06-14 23:49:08 -05:00
rockstardev
e834cd7595 Add Notification Entity migration 2020-06-14 23:49:08 -05:00
rockstardev
6ddb20d022 Foundation for events to propagate notifications 2020-06-14 23:49:08 -05:00
Kukks
587f244f1d Remove dependency on Common from Rating
replaces #1591 and #1592 , closes #1571 Replaces the Currencies.txt to a json format which includes the networks too ( there is also a test to check now) Also makes CurrencyPair not depend on network and instead use CurrencyNameTable
2020-05-31 20:54:50 +02:00
Andrew Camilleri
d47e225dce
Fix email sending on registration crash (#1454) 2020-04-10 15:59:39 +09:00
nicolas.dorier
a01b2e4a83
Small optimization for faster AddDerivationScheme 2020-04-05 18:35:29 +09:00
Kukks
e99767c7e2 Greenfield API: Create User
Slightly big PR because I started refactoring to reduce code duplication between the UI based business logic and the api one.
2020-03-17 08:21:27 +01:00
nicolas.dorier
c8e1db2102
Better event messages 2020-03-11 21:11:07 +09:00
Andrew Camilleri
025da0261d new feature: Wallet Receive Page (#1065)
* new feature: Wallet Receive Page

closes #965

* Conserve addresses by waiting till address is spent before generating each run

* fix tests

* Filter by cryptocode before matching outpoint

* fix build

* fix edge case issue

* use address in keypathinfo directly

* rebase fixes

* rebase fixes

* remove duplicate code

* fix messy condition

* fixes

* fix e2e

* fix
2020-01-18 14:12:27 +09:00
nicolas.dorier
9688798a4a
Asyncify SSH access, do not show SSH service if ssh is not well configured 2019-08-27 23:30:25 +09:00
Andrew Camilleri
3e9bee2d44 simplify settings changed listening (#976)
* simplify settings changed listening

Might as well use the Event aggregator to listen in on changes instead of the current complicated magic in the settings repo. This also reduces db calls( it sends the new settings through the event instead of fetching them again)

* add settings extension

* switch to old style but using event aggregator
2019-08-22 20:44:06 +09:00