Feature: Plugin can extend whether an account can login or not

This commit is contained in:
Nicolas Dorier
2025-11-14 15:56:14 +09:00
parent a914d798f3
commit 41f5588257
13 changed files with 440 additions and 288 deletions

View File

@@ -444,7 +444,7 @@ namespace BTCPayServer.Controllers.Greenfield
}
// User shouldn't be deleted if it's the only admin
if (await _userService.IsUserTheOnlyOneAdmin(user))
if (await _userService.IsUserTheOnlyOneAdmin(new (user, baseUrl: Request.GetRequestBaseUrl())))
{
return Forbid(AuthenticationSchemes.GreenfieldBasic);
}