remove SiteSettings from Alias for better separation of concerns

This commit is contained in:
Shaun Walker
2022-03-27 19:47:52 -04:00
parent b92a888583
commit f9432acf1b
13 changed files with 78 additions and 84 deletions

View File

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
namespace Oqtane.Models
{
public interface IAlias
{
int AliasId { get; set; }
string Name { get; set; }
int TenantId { get; set; }
int SiteId { get; set; }
bool IsDefault { get; set; }
string CreatedBy { get; set; }
DateTime CreatedOn { get; set; }
string ModifiedBy { get; set; }
DateTime ModifiedOn { get; set; }
string Path { get; }
string SiteKey { get; }
Dictionary<string, string> SiteSettings { get; set; }
}
}

View File

@ -7,7 +7,7 @@ namespace Oqtane.Models
/// <summary>
/// An Alias maps a url like `oqtane.my` or `oqtane.my/products` to a <see cref="Oqtane.Models.Site"/> and <see cref="Oqtane.Models.Tenant"/>
/// </summary>
public class Alias : IAlias, IAuditable
public class Alias : IAuditable
{
/// <summary>
/// The primary ID for internal use. It's also used in API calls to identify the site.
@ -84,7 +84,7 @@ namespace Oqtane.Models
/// <summary>
/// Site-specific settings (only available on the server via HttpContext for security reasons)
/// </summary>
[NotMapped]
public Dictionary<string, string> SiteSettings { get; set; }
//[NotMapped]
//public Dictionary<string, string> SiteSettings { get; set; }
}
}

View File

@ -87,7 +87,7 @@ namespace Oqtane.Shared
public static readonly string DefaultVisitorFilter = "bot,crawler,slurp,spider,(none),??";
public static readonly string HttpContextAliasKey = "SiteState.Alias";
public static readonly string SiteToken = "{SiteToken}";
public static readonly string HttpContextAliasKey = "Alias";
public static readonly string HttpContextSiteSettingsKey = "SiteSettings";
}
}