* Adapt cookie auth to work with same API permission system
* Handle unscoped store permission case
* Do not consider Unscoped as a valid policy
* Add tests
* Refactor permissions scopes
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Editorconfig: Add space_before_self_closing setting
This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html
* Editorconfig: Keep 4 spaces indentation for Swagger JSON files
They are all formatted that way, let's keep it like that.
* Apply dotnet-format, mostly white-space related changes
* Plugins: Add authorization hook
Makes the `PolicyRequirement` available to plugins.
Adds a filter hook to the authorization handlers, so that plugins can extend and leverage the existing authorization policies and permissions.
* Update to pass back and forth handle class
* Mention the missing API permission in the response header or body
* Fixes + Added a unit test. 1 TODO remains.
* Added MissingPermissionDescription to the error
* Update BTCPayServer.Tests/GreenfieldAPITests.cs
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Fix tests
* [GreenField]: Make sure we are sending fully typed errors
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* wip
* Local GreenField Client for Plugins
* support notification handlers being missing
* Initial support for scoped btcpay client
* test out scoped local client
* wip
* small fix
* Throw exception if using local greenfield client and it has not been implemented yet
* adapt based on new changes in BTCPay
* update
* fix tests
* Allow Local client to bypass authorization handler
* Add Misc endpoints to Local API Client
* Add new endpoints
* Apply code review changes
* GreenField: Notifications API
This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove notifications of the current user.
* add tests + docs
* fix test
* pr changes
* fix permission json
* GreenField: Cross-implemenation Lightning Node API
* switch to hard unrsstricted check
* fix
* set LightningPrivateRouteHints in swagger + stores api
* add priv route hint
* rename models and add swagger defs to models
* GreenField: Payment Requests CRUD
* fixes
* fix swagger
* fix swag
* rebase fixes
* Add new permissions for payment requests
* Adapt PR to archive
* fix tst
* add to contains policxy
* make decimals returned as string due to avoid shitty language parsing issues
* do not register decimal json converter as global
* fix cultureinfo for json covnerter
* pr changes
* add json convertet test
* fix json test
* fix rebase