btcpayserver/BTCPayServer/Services/PoliciesSettings.cs
Andrew Camilleri 4d0b402e8b
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use

closes #1974

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00

47 lines
2.1 KiB
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Services.Apps;
using BTCPayServer.Validation;
using Newtonsoft.Json;
namespace BTCPayServer.Services
{
public class PoliciesSettings
{
[Display(Name = "Requires a confirmation mail for registering")]
public bool RequiresConfirmedEmail { get; set; }
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
[Display(Name = "Disable registration")]
public bool LockSubscription { get; set; }
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
[Display(Name = "Discourage search engines from indexing this site")]
public bool DiscourageSearchEngines { get; set; }
[Display(Name = "Allow non-admins to use the internal lightning node in their stores")]
public bool AllowLightningInternalNodeForAll { get; set; }
[Display(Name = "Allow non-admins to create hot wallets for their stores")]
public bool AllowHotWalletForAll { get; set; }
[Display(Name = "Allow non-admins to import their hot wallets to the node wallet")]
public bool AllowHotWalletRPCImportForAll { get; set; }
[Display(Name = "Check releases on GitHub and alert when new BTCPayServer version is available")]
public bool CheckForNewVersions { get; set; }
[Display(Name = "Disable notifications automatically showing (no websockets)")]
public bool DisableInstantNotifications { get; set; }
[Display(Name = "Display app on website root")]
public string RootAppId { get; set; }
public AppType? RootAppType { get; set; }
public List<DomainToAppMappingItem> DomainToAppMapping { get; set; } = new List<DomainToAppMappingItem>();
public class DomainToAppMappingItem
{
[Display(Name = "Domain")] [Required] [HostName] public string Domain { get; set; }
[Display(Name = "App")] [Required] public string AppId { get; set; }
public AppType AppType { get; set; }
}
}
}