Commit Graph

66 Commits

Author SHA1 Message Date
Kukks
179520a211 Plugins: Allow creation of independent DbContexts
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
2020-11-18 12:27:26 +01:00
Andrew Camilleri
5979fe5eef
BTCPay Extensions Part 2 (#2001)
* BTCPay Extensions Part 2

This PR cleans up the extension system a bit in that:
 * It renames the test extension to a more uniform name
 * Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed)
 * Adds a tool to help you generate an extension package from a csproj
 * Refactors the UI extension points to a view component
 * Moves some more interfaces to the Abstractions csproj

* Rename to plugins
2020-10-21 14:02:20 +02:00
Andrew Camilleri
4d0b402e8b
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use

closes #1974

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00
Dennis Reimann
dd27ad79bd
API Keys UI: Properly align form items 2020-10-16 22:31:09 +02:00
Nicolas Dorier
62f00fa970
Merge pull request #1886 from Kukks/invite-link
Allow admins to invite new users
2020-09-19 11:15:38 +09:00
Dennis Reimann
7e60328cff
Greenfield: Rename API key redirect params; switch to POST body (#1898)
* Rename user param to userId in API key redirect

This way it is clearer what to expect and it also make the parameteer easier to consume.

* Post redirect: Allow form url and prettify page

- Form URL as alternative to controller/action for external URLs
- Making it look nice and add explanation for non-JS case

* APIKeys: Minor view updates

fix

* APIKeys: Use POST redirect for confirmation

fix

* UI: Minor update to confirm view

Tidies it up and adapts to the newly added ConfirmAPIKeys view.

* APIKeys: Update delete view

Structures the information in title and description better.

* APIKeys: Distinguish authorize and confirm (reuse)

* Upgrade ChromeDriver

* Test fixes

* Clean up PostRedirect view

By adding missing forgery token

* Re-add tests for callback post values

* Rename key param to apiKey in API key redirect

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.authorization.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Use DEBUG conditional for postredirect-callback-test route

* Remove unnecessary ChromeDriver references

* Add debug flag

* Remove debug flags

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-09-17 11:37:49 +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
7ca74aeea7 Add API Keys Application identifier
This lets the authorize api key screen redirect to the defined url  and provide it with the user id, permissions granted and the key.

This also allows apps to match existing api keys generated for it specifically using the application identifier, and if matched, presented with a confirmation page before redirection.
2020-08-28 09:00:13 +02:00
Dennis Reimann
391d7b01d1
UI: Minor enhancements to 2FA view
Improve hover highlight for light and dark theme. APply a bit more spacing to the 2FA link cells.

Also fixes table row highlight in light theme.
2020-07-14 13:29:26 +02:00
Kukks
006ebf3f15 Fix 2FA config screens 2020-07-13 10:58:53 +02:00
Nicolas Dorier
04f71155b0
Merge pull request #1721 from dennisreimann/ui-updates-account
UI updates: Account section
2020-07-13 17:39:35 +09:00
Dennis Reimann
0e410af63f
Fix spacing for subnavs on mobile 2020-07-09 17:20:08 +02:00
Dennis Reimann
7a46b2fd1b
Improve user profile view 2020-07-08 19:20:32 +02:00
Dennis Reimann
bfd25b8a14
Improve API keys list view 2020-07-08 19:20:24 +02:00
Dennis Reimann
dae8163846
Improve change password view 2020-07-08 19:20:11 +02:00
Dennis Reimann
4db6c16068
Improve U2F view 2020-07-08 19:19:55 +02:00
Dennis Reimann
906ecc021b
Improve 2FA views 2020-07-08 19:19:29 +02: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
Dennis Reimann
8420c74b31
Improve static asset caching
Cache static assets for one year and set the correct cache control header. Adds the cache busting version based on file content to asset references to invalidate the cache on change. ([further details on the approach](https://andrewlock.net/adding-cache-control-headers-to-static-files-in-asp-net-core/) and [why one year](https://ashton.codes/set-cache-control-max-age-1-year/))

Most of the changes are the additions of the `asp-append-version="true"` attribute, the main configuration change is in `Startup.cs`.
2020-04-18 17:56:05 +02:00
Kukks
ad284a4b61 Refactor UI for Add APIKey/Authorize 2020-04-10 09:49:01 +02:00
Kukks
c6d75de3d7 GreenField: Switch to Blob for API Keys 2020-04-02 09:32:22 +02:00
nicolas.dorier
08abda1522
Restrict authentication to the APIController to GreenFieldAPIKeys 2020-03-27 13:34:03 +09:00
Kukks
6df7ffd7e2 lol windows phone 2020-03-24 08:55:47 +01:00
nicolas.dorier
ad4dbdad6d
Fix the PermissionJsonConverter 2020-03-20 19:57:00 +09:00
nicolas.dorier
094307d688
Remove warning and improve UI of permission selection 2020-03-20 19:39:02 +09:00
nicolas.dorier
4666238e38
Fix build 2020-03-20 18:38:21 +09:00
nicolas.dorier
29a807696b
Refactor permissions of GreenField 2020-03-19 23:43:51 +09:00
Kukks
8173296c96 Greenfield API: Get current User
Builds on #1368
This PR adds a new endpoint: Get current user.. It only returns the current user's id and email for now( let's extend later)
It also adds a new permission: `ProfileManagement` which is needed for this endpoint (and for update endpoints later)
2020-03-12 14:59:24 +01:00
Kukks
786be9d1f5 fix tests 2020-03-11 16:54:53 +01:00
Kukks
233fa8a4a1 BTCPayServer.Client library + Revoke API Key 2020-03-11 16:54:53 +01:00
Umar Bolatov
efda8ff5bd
Specify QR code error correction level explicitly
fix #1332
2020-03-01 14:16:24 -08:00
Kukks
e7eea1036b make api key delete use confirm page 2020-02-26 10:26:38 +01:00
nicolas.dorier
d9ea9fbffd
Fix colspan 2020-02-26 17:34:32 +09:00
Kukks
0c7f35b000 fix swagger gen 2020-02-26 09:17:50 +01:00
Kukks
0a8b303c11 add label for api keys, make api keys without -, fix null exception on authorize 2020-02-25 14:43:53 +01:00
Andrew Camilleri
fa51180dfa
Api keys with openiddict (#1262)
* Remove OpenIddict

* Add API Key system

* Revert removing OpenIddict

* fix rebase

* fix tests

* pr changes

* fix tests

* fix apikey test

* pr change

* fix db

* add migration attrs

* fix migration error

* PR Changes

* Fix sqlite migration

* change api key to use Authorization Header

* add supportAddForeignKey

* use tempdata status message

* fix add api key css

* remove redirect url + app identifier feature :(
2020-02-24 22:36:15 +09:00
Dennis Reimann
e1bf376f10
Mark up alert-links for better display 2019-11-15 11:24:27 +01:00
Dennis Reimann
e147ce8606
Minor layout improvements 2019-11-14 18:45:35 +01:00
nicolas.dorier
aad586232c
Refactor StatusMessage and remove ExternalLogin 2019-10-31 14:11:33 +09:00
rockstardev
7282199c31 Cleanup U2F namespace to correspond to folder path 2019-10-02 12:32:41 -05:00
Umar Bolatov
27f20386df Add confirmation button to recovery codes view (#984)
fix #806
2019-08-29 17:16:02 +09:00
Umar Bolatov
1447b5e8be Add top margin to 2FA screen heading (#986)
fix #985
2019-08-29 16:16:16 +09:00
Nicolas Dorier
be5597085b
Use Safe.Raw and Safe.Json instead of Html.Raw and the JsonHelper, move sanitization at the View level (#960) 2019-08-10 14:05:11 +09:00
nicolas.dorier
4cbcdb8af5
Make sure QRCodes use SVG instead of canvas (QRCodes on Tor does not work because of canvas fingerprinting protections) 2019-07-19 16:27:26 +09:00
nicolas.dorier
f0c106de75
Change the menu nav bar pages by moving the title above the nav pills 2019-06-06 18:29:54 +09:00
britttttk
698033b0cf Selenium Chrome Tests 2019-05-12 18:49:28 +09:00
Andrew Camilleri
19a990b095 Add U2f Login Support (#787)
* init u2f

* ux fixes

* Cleanup Manage Controller

* final changes

* remove logs

* remove console log

* fix text for u2f

* Use Is Secure instead of IsHttps

* add some basic u2f tests

* move loaders to before title

* missing commit

* refactor after nicolas wtf moment
2019-05-02 21:01:08 +09:00
nicolas.dorier
16b57f24a2 Fix #383 2018-11-10 23:25:11 +09:00
nicolas.dorier
7a04c2974f Center QR Authenticator QR Code 2018-10-09 23:30:26 +09:00