mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-05 15:14:21 +01:00
Add the StoreScope
This commit is contained in:
@@ -35,7 +35,7 @@ namespace BTCPayServer.Services.Notifications
|
||||
{
|
||||
foreach (var uid in users)
|
||||
{
|
||||
var obj = JsonConvert.SerializeObject(this);
|
||||
var obj = JsonConvert.SerializeObject(notification);
|
||||
var data = new NotificationData
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
@@ -67,6 +67,14 @@ namespace BTCPayServer.Services.Notifications
|
||||
var admins = await _userManager.GetUsersInRoleAsync(Roles.ServerAdmin);
|
||||
return admins.Select(a => a.Id).ToArray();
|
||||
}
|
||||
if (scope is StoreScope s)
|
||||
{
|
||||
using var ctx = _contextFactory.CreateContext();
|
||||
return ctx.UserStore
|
||||
.Where(u => u.StoreDataId == s.StoreId)
|
||||
.Select(u => u.ApplicationUserId)
|
||||
.ToArray();
|
||||
}
|
||||
throw new NotSupportedException("Notification scope not supported");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@inject BTCPayServer.HostedServices.CssThemeManager themeManager
|
||||
@{
|
||||
ViewData["Title"] = "Log in";
|
||||
Layout = "_LayoutWelcome";
|
||||
}
|
||||
@if (TempData.HasStatusMessage())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user