2020-06-28 21:44:35 -05:00
|
|
|
using System;
|
2024-03-19 14:58:33 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using BTCPayServer.Services.Stores;
|
2020-06-15 16:45:29 +09:00
|
|
|
|
2024-03-19 14:58:33 +01:00
|
|
|
namespace BTCPayServer.Services.Notifications;
|
|
|
|
|
|
|
|
public class AdminScope : INotificationScope;
|
|
|
|
public class StoreScope : INotificationScope
|
2020-06-15 16:45:29 +09:00
|
|
|
{
|
2024-03-19 14:58:33 +01:00
|
|
|
public StoreScope(string storeId, IEnumerable<StoreRoleId> roles = null)
|
2020-10-20 13:09:09 +02:00
|
|
|
{
|
2024-03-19 14:58:33 +01:00
|
|
|
ArgumentNullException.ThrowIfNull(storeId);
|
|
|
|
StoreId = storeId;
|
|
|
|
Roles = roles;
|
2020-10-20 13:09:09 +02:00
|
|
|
}
|
2024-03-19 14:58:33 +01:00
|
|
|
public string StoreId { get; }
|
|
|
|
public IEnumerable<StoreRoleId> Roles { get; set; }
|
|
|
|
}
|
2020-06-15 16:45:29 +09:00
|
|
|
|
2024-03-19 14:58:33 +01:00
|
|
|
public class UserScope : INotificationScope
|
|
|
|
{
|
|
|
|
public UserScope(string userId)
|
2020-06-15 16:45:29 +09:00
|
|
|
{
|
2024-03-19 14:58:33 +01:00
|
|
|
ArgumentNullException.ThrowIfNull(userId);
|
|
|
|
UserId = userId;
|
2020-06-15 16:45:29 +09:00
|
|
|
}
|
2024-03-19 14:58:33 +01:00
|
|
|
public string UserId { get; }
|
2020-06-15 16:45:29 +09:00
|
|
|
}
|
2024-03-19 14:58:33 +01:00
|
|
|
|
|
|
|
public interface INotificationScope;
|