mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
* Onboarding: Invite new users - Separates the user self-registration and invite cases - Adds invitation email for users created by the admin - Adds invitation tokens to verify user was invited - Adds handler action for invite links - Refactors `UserEventHostedService` - Fixes #5726. * Add permissioned form tag helper * Better way of changing a user's role * Test fixes
30 lines
755 B
C#
30 lines
755 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using BTCPayServer.Services.Stores;
|
|
|
|
namespace BTCPayServer.Services.Notifications;
|
|
|
|
public class AdminScope : INotificationScope;
|
|
public class StoreScope : INotificationScope
|
|
{
|
|
public StoreScope(string storeId, IEnumerable<StoreRoleId> roles = null)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(storeId);
|
|
StoreId = storeId;
|
|
Roles = roles;
|
|
}
|
|
public string StoreId { get; }
|
|
public IEnumerable<StoreRoleId> Roles { get; set; }
|
|
}
|
|
|
|
public class UserScope : INotificationScope
|
|
{
|
|
public UserScope(string userId)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(userId);
|
|
UserId = userId;
|
|
}
|
|
public string UserId { get; }
|
|
}
|
|
|
|
public interface INotificationScope;
|