Activity index, Db schema validation.
This commit is contained in:
2021-05-31 20:27:40 +01:00
parent 63473c725b
commit 7b0a710b13
36 changed files with 1008 additions and 208 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
public static class Version
{
private static String version { get; } = "1.0.5.0";
private static String version { get; } = "1.0.5.3";
// Retrieve version.
public static String GetFullVersion () { return version; }
public static String GetAppVersion ()
@@ -39,9 +39,9 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
// Version history.
// 1.0.5 ?-May-2021 Activity Index
// - Admin Database page.
// - Online Account country.
// 1.0.5 31-May-2021 Activity Index
// - Admin Database Schema (Home) and Tables page.
// - Online Account country, Home activities.
// 1.0.4 20-May-2021 Online profile sports & opportunities
// - Admin Organisation Region & Sport.
// - Online Profile Sports - simple list with name.
@@ -69,6 +69,8 @@ namespace Saxonite.Net.Standard.Base.App
LastName = userAccount.LastName;
DisplayName = userAccount.GetDisplayName();
EmailAddress = userAccount.EmailAddress;
RegionIdCountry = userAccount.RegionIdCountry;
RegionIdProvince = userAccount.RegionIdProvince;
if (sessionContext.Application == Sax.Application.Admin)
KeepLoggedIn = userAccount.KeepLoggedIn_Admin;
else if (sessionContext.Application == Sax.Application.Online)
@@ -87,12 +89,13 @@ namespace Saxonite.Net.Standard.Base.App
public String LastName { get; protected set; }
public String DisplayName { get; protected set; }
public String EmailAddress { get; protected set; }
public SysId RegionIdCountry { get; protected set; }
public SysId RegionIdProvince { get; protected set; }
public bool KeepLoggedIn { get; protected set; }
public bool UserAccountSupplied { get; protected set; }
// Roles.
public class RoleData
{
private RoleData() { }
public RoleData(SaxUserRole userRole)
{
if (userRole != null)
@@ -107,13 +110,6 @@ namespace Saxonite.Net.Standard.Base.App
[JsonIgnore]
private readonly List<RoleData> roles = new List<RoleData>();
public List<RoleData> Roles { get { return new List<RoleData>(roles); } protected set { roles.Clear(); roles.AddRange(value); } }
/// <summary>User - JSON deserialisation route.</summary>
protected void SetRoles(List<RoleData> roles)
{
if (this.roles.Count > 0)
throw new NotSupportedException("Session Data Roles cannot be replaced.");
this.roles.AddRange(roles);
}
[JsonIgnore]
public bool IsJournalist { get { return roles?.Exists(item => item.Role == Sax.UserRole.Journalist) ?? false; } }
}
@@ -122,7 +118,7 @@ namespace Saxonite.Net.Standard.Base.App
protected void SetUser(UserData user)
{
if (User != null && User.UserAccountSupplied)
throw new NotSupportedException("Session Data User cannot be replaced.");
throw new NotSupportedException("Session User cannot be replaced.");
User = user;
}