BusinessMgr web security.
This commit is contained in:
@@ -5,7 +5,6 @@ using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Security;
|
||||
using Sarand.Net.Standard.Dbas.Base;
|
||||
using Sarand.Net.Standard.Dbas.Utils;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
|
||||
@@ -20,7 +19,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Protected construction - use derived class.
|
||||
protected SaSecurityConsole_Dbas(SacsDatabase database)
|
||||
protected SaSecurityConsole_Dbas(ISacsDatabase database)
|
||||
{
|
||||
Database = database;
|
||||
// Initialise security manager.
|
||||
@@ -37,7 +36,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Database properties.
|
||||
internal SacsDatabase Database { get; set; }
|
||||
internal ISacsDatabase Database { get; set; }
|
||||
public override bool DatabaseIsValid { get { return securityMgr.DatabaseIsValid; } }
|
||||
public override bool CanUpdateDatabase { get { return securityMgr.CanUpdateDatabase; } }
|
||||
public override bool ColumnExists(SaSecurityDbDfn.ColumnIdx columnIdx)
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.Security;
|
||||
using Sarand.Net.Standard.Dbas.Base;
|
||||
using Sarand.Net.Standard.Dbas.Data;
|
||||
using Sarand.Net.Standard.Dbas.Security.Internal;
|
||||
|
||||
namespace Sarand.Net.Standard.Dbas.Security
|
||||
{
|
||||
@@ -30,7 +24,7 @@ namespace Sarand.Net.Standard.Dbas.Security
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
internal SaSecurityConsole_Dbas SecurityConsole { get; }
|
||||
internal SacsDatabase Database { get { return SecurityConsole.Database; } }
|
||||
internal ISacsDatabase Database { get { return SecurityConsole.Database; } }
|
||||
private DbDataItem.DatabaseInfo DbInfo { get; }
|
||||
public String TableName_SecItem { get { return SaSecurityDbDfn.GetTableName(SaSecurityDbDfn.TableIdx.SaSecItem); } }
|
||||
public String TableName_SecLink { get { return SaSecurityDbDfn.GetTableName(SaSecurityDbDfn.TableIdx.SaSecLink); } }
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Sarand.Net.Standard.Base.UpdateLog;
|
||||
using Sarand.Net.Standard.Dbas.Base;
|
||||
|
||||
namespace Sarand.Net.Standard.Dbas.UpdateLog
|
||||
{
|
||||
@@ -22,7 +21,7 @@ namespace Sarand.Net.Standard.Dbas.UpdateLog
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaUpdateLogConsole_Dbas (SacsDatabase database)
|
||||
protected SaUpdateLogConsole_Dbas (ISacsDatabase database)
|
||||
{
|
||||
Database = database;
|
||||
updateLogMgr = new SaUpdateLogMgr_Dbas(this);
|
||||
@@ -38,7 +37,7 @@ namespace Sarand.Net.Standard.Dbas.UpdateLog
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
internal SacsDatabase Database { get; set; }
|
||||
internal ISacsDatabase Database { get; set; }
|
||||
public override bool DatabaseIsValid { get { return updateLogMgr.DatabaseIsValid; } }
|
||||
public override bool CanUpdateDatabase { get { return updateLogMgr.CanUpdateDatabase; } }
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Sarand.Net.Standard.Dbas.UpdateLog
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public String TableName_UpdateLog { get { return SaUpdateLogDbDfn.GetTableName(SaUpdateLogDbDfn.TableIdx.SaAttrUpdate); } }
|
||||
internal SacsDatabase Database { get; }
|
||||
internal ISacsDatabase Database { get; }
|
||||
private DbDataItem.DatabaseInfo DbInfo { get; }
|
||||
public override bool DatabaseIsValid { get { return (Database != null && Database.GetTableNames().Contains(TableName_UpdateLog)); } }
|
||||
public override bool CanUpdateDatabase { get { return DatabaseIsValid; } }
|
||||
|
||||
Reference in New Issue
Block a user