This commit is contained in:
Paul Schneider 2026-02-28 21:17:54 +00:00
commit 40e8e08690
3487 changed files with 39 additions and 21 deletions

View file

@ -0,0 +1,6 @@
namespace Yavsc
{
public class CompanyInfoSettings {
public string ApiKey { get; set; }
}
}

View file

@ -0,0 +1,8 @@
namespace Yavsc
{
public class DataProtectionSettings
{
public Dictionary<string,string> Keys { get; set; }
public int ExpiresInHours { get; set; }
}
}

View file

@ -0,0 +1,17 @@
namespace Yavsc
{
public class GoogleAuthSettings
{
public string ClientId { get; set; }
public string ClientSecret { get; set; }
public string ApiKey { get; set; }
public string BrowserApiKey { get; set; }
public string GoogleServiceAccountJson { get; set; }
public string GoogleWebClientJson { get; set; }
}
}

View file

@ -0,0 +1,19 @@
namespace Yavsc
{
public class GoogleServiceAccount
{
public string type { get; set; }
public string project_id { get; set; }
public string private_key_id { get; set; }
public string private_key { get; set; }
public string client_email { get; set; }
public string client_id { get; set; }
public string auth_uri { get; set; }
public string token_uri { get; set; }
public string auth_provider_x509_cert_url { get; set; }
public string client_x509_cert_url { get; set; }
}
}

View file

@ -0,0 +1,21 @@
namespace Yavsc
{
/// <summary>
/// OAuth2 client application sensitive settings.
/// </summary>
public class OAuth2AppSettings {
public string ClientId { get; set; }
public string ClientSecret { get; set; }
}
/// <summary>
/// Facebook's class, so class
/// </summary>
public class FacebookOAuth2AppSettings : OAuth2AppSettings {
}
}

View file

@ -0,0 +1,57 @@
namespace Yavsc
{
/// <summary>
/// PayPal NV/SOAP API Credentials
/// </summary>
public class PayPalSettings {
/// <summary>
/// supported values: <c>sandbox</c> or <c>production</c>
/// </summary>
/// <returns></returns>
public string Mode { get; set; }
/// <summary>
/// Client Id using the REST API
/// </summary>
public string ClientId { get; set; }
/// <summary>
/// Client Secret using the REST API
/// </summary>
/// <returns></returns>
public string ClientSecret { get; set; }
/// <summary>
/// Application Id using the REST API
/// </summary>
/// <returns></returns>
public string ApplicationId { get; set; }
/// <summary>
/// Get it from your PayPal Business profile settings
/// </summary>
/// <returns></returns>
public string MerchantAccountId { get; set; }
/// <summary>
/// Merchant PayPal Classic Api user name
/// </summary>
/// <returns></returns>
public string MerchantAccountUserName { get; set; }
/// <summary>
/// PayPal Classic Api credentials model
/// </summary>
public class ClassicPayPalAccountApiCredential {
public string Signature { get; set; }
public string ApiUsername { get; set; }
public string ApiPassword { get; set; }
}
/// <summary>
/// Live access is configured at:
/// https://www.paypal.com/businessprofile/mytools/apiaccess
/// </summary>
public ClassicPayPalAccountApiCredential[] Accounts { get; set; }
}
}

View file

@ -0,0 +1,85 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Yavsc.Models.Relationship;
namespace Yavsc
{
public class SiteSettings
{
public string Title { get; set; } = "Yavsc";
public string Slogan { get; set; } = "";
public string Banner { get; set; } = "";
public string StyleSheet { get; set; } = "site.css";
public string FavIcon { get; set; } = "favicon.ico";
public string Logo { get; set; } = "logo.png";
/// <summary>
/// </summary>
/// <returns></returns>
public string Audience { get; set; } = "lua.pschneider.fr";
/// <summary>
/// External Url
/// </summary>
/// <value></value>
public string ExternalUrl { get; set; } = "http://lua.pschneider.fr";
/// <summary>
/// Must be a fqdn.
/// </summary>
/// <returns></returns>
public string Authority { get; set; } = "lua.pschneider.fr";
/// <summary>
/// Owner's email
/// </summary>
/// <returns></returns>
public StaticContact Owner { get; set; } = new StaticContact
{
EMail = "root@lua.pschneider.fr",
Name = "Root"
} ;
/// <summary>
/// Administrator's email
/// </summary>
/// <returns></returns>
public StaticContact Admin { get; set; } = new StaticContact
{
EMail = "root@lua.pschneider.fr",
Name = "Root"
} ;
public string DataDir { get; set; } = "data";
public string Avatars { get; set; } = "avatars";
public long Quota { get; set; }
public string Blog { get; set; } = "blogs";
public string Bills { get; set; } = "bills";
public string GitRepository { get; set; } = "sources";
public string BusinessName { get; set; } = "Yavsc";
public string? Street { get; set; }
public string? PostalCode { get; set; }
public string? CountryCode { get; set; }
public string HomeViewName { get; set; } = "Home";
/// <summary>
/// Specifies the directory where should be
/// generated pdf files using pandoc
/// </summary>
/// <returns>The temporary directory to use</returns>
public string TempDir { get; set; } = "temp";
/// <summary>
/// Disk usage user list maximum length in memory
/// </summary>
/// <value></value>
public int DUUserListLen { get; set; } = 256;
/// <summary>
/// Default acl file name
/// </summary>
/// <value></value>
public string AccessListFileName { get; set; } = ".access";
}
}

View file

@ -0,0 +1,13 @@
namespace Yavsc.Settings
{
public class SmtpSettings
{
public string Server { get; set; }
public int Port { get; set; }
public string SenderName { get; set; }
public string SenderEmail { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Yavsc
{
public class TwilioSettings {
public string AccountSID { get; set; }
public string Token { get; set; }
public string SMSAccountFrom { get; set; }
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using Yavsc.Models;
namespace Yavsc.Server.Settings
{
public class UserPolicies
{
public static readonly Dictionary<string, Func<ApplicationUser, bool>> Criterias =
new Dictionary<string, Func<ApplicationUser, bool>>
{
{ "allow-monthly", u => u.AllowMonthlyEmail },
{ "email-not-confirmed", u => !u.EmailConfirmed }
};
}
}