Commit Graph

14 Commits

Author SHA1 Message Date
Nicolas Dorier
0a0cf97c55
Do not cleanup unreachable stores (#5025) 2023-05-31 11:22:37 +09:00
nicolas.dorier
a5ff655eed
Fix: If user get locked out, unlocking or deleting user fails
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.
2023-02-15 14:28:34 +09:00
d11n
d5d0be5824
Code formatting updates (#4502)
* 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
2023-01-06 22:18:07 +09:00
d11n
f5c5178f95
Lock user: Improve return code and fix docs (#4377)
* 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
2022-12-07 19:01:50 +01:00
rustywave
2ad2ce6c3b Fixed issue with users when disabling then setting admin
Concurrency issue; moved user update from controller to service
2022-06-07 13:04:21 +02:00
rustywave
a443426d83 Fix remove and enable issues with non-last-admin
"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.
2022-06-06 10:43:06 +02:00
Andrew Camilleri
273bc78db3
Allow Users to be disabled/enabled (#3639)
* 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>
2022-04-26 21:27:35 +09:00
Wouter Samaey
288fbda54f
New API endpoint: Find 1 user by ID or by email, or list all users. (#3176)
Co-authored-by: Kukks <evilkukka@gmail.com>
2022-02-15 16:19:52 +01:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
Kukks
51f0c2a5f8 Apply better messages 2021-11-04 08:53:44 +01:00
Umar Bolatov
b4076b53e8
Add IsAdminUser method to UserService 2021-06-02 20:02:28 -07:00
Umar Bolatov
7c11736992
Enable nullable reference checking in UserService 2021-06-02 20:02:28 -07:00
Umar Bolatov
2ed8341403
Add IsRoleAdmin to user service 2021-06-02 20:02:26 -07:00
Umar Bolatov
e5a196918f
Add user service 2021-06-02 20:02:26 -07:00