This is due to the fact our UserService is a singleton, and it had a
reference on UserManager which is scoped.
UserManager is caching user entities at the scope level.
UserService then had a view completely unsynchronized with the database.
* 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
* Lock user: Improve return code and fix docs
The docs state that the `DELETE` method should be used, though the controller wants `POST`. The latter seems appropriate here, as the action can be used for locking and unlocking.
Also adapted the action to return a status code based on the actual outcome of the user toggle call.
Closes#4310.
* Update clients
"Remove" issue likely due to multiple context instances. "Enable" issue due to conditional check.
Discovered bug with users when first disabling, then marking as admin, which remains an issue.
* Allow Users to be disabled/enabled
* rebrand to locked for api
* Update BTCPayServer/Views/UIAccount/Lockout.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
* fix docker compose and an uneeded check in api handler
* fix
* Add enabled user test
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>