Remove this keyword
This commit is contained in:
parent
a46235ea1e
commit
303bdf3be2
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
public void SetModuleMessage(string message, MessageType type)
|
public void SetModuleMessage(string message, MessageType type)
|
||||||
{
|
{
|
||||||
this.message = message;
|
message = message;
|
||||||
classname = GetMessageType(type);
|
classname = GetMessageType(type);
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ else
|
||||||
{
|
{
|
||||||
if (RichTextEditorMode)
|
if (RichTextEditorMode)
|
||||||
{
|
{
|
||||||
content = await this.RichTextEditorHtml.GetHTML();
|
content = await RichTextEditorHtml.GetHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
content = content.Replace(((PageState.Alias.Path == "") ? "/~" : PageState.Alias.Path) + Constants.ContentUrl, Constants.ContentUrl);
|
content = content.Replace(((PageState.Alias.Path == "") ? "/~" : PageState.Alias.Path) + Constants.ContentUrl, Constants.ContentUrl);
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Modules.HtmlText.Services
|
||||||
|
|
||||||
public HtmlTextService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public HtmlTextService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this.http = http;
|
http = http;
|
||||||
this.sitestate = sitestate;
|
sitestate = sitestate;
|
||||||
this.NavigationManager = NavigationManager;
|
NavigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Oqtane.Modules
|
||||||
|
|
||||||
public ModuleBase()
|
public ModuleBase()
|
||||||
{
|
{
|
||||||
this.logger = new Logger(this);
|
logger = new Logger(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
|
@ -43,7 +43,7 @@ namespace Oqtane.Modules
|
||||||
|
|
||||||
public string ModulePath()
|
public string ModulePath()
|
||||||
{
|
{
|
||||||
return "Modules/" + this.GetType().Namespace + "/";
|
return "Modules/" + GetType().Namespace + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// url methods
|
// url methods
|
||||||
|
@ -135,7 +135,7 @@ namespace Oqtane.Modules
|
||||||
{
|
{
|
||||||
UserId = PageState.User.UserId;
|
UserId = PageState.User.UserId;
|
||||||
}
|
}
|
||||||
string category = this.GetType().AssemblyQualifiedName;
|
string category = GetType().AssemblyQualifiedName;
|
||||||
string feature = Utilities.GetTypeNameLastSegment(category, 1);
|
string feature = Utilities.GetTypeNameLastSegment(category, 1);
|
||||||
LogFunction logfunction;
|
LogFunction logfunction;
|
||||||
if (string.IsNullOrEmpty(function))
|
if (string.IsNullOrEmpty(function))
|
||||||
|
@ -170,7 +170,7 @@ namespace Oqtane.Modules
|
||||||
|
|
||||||
public Logger(ModuleBase modulebase)
|
public Logger(ModuleBase modulebase)
|
||||||
{
|
{
|
||||||
this.modulebase = modulebase;
|
modulebase = modulebase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task LogTrace(string message, params object[] args)
|
public async Task LogTrace(string message, params object[] args)
|
||||||
|
|
|
@ -19,9 +19,9 @@ namespace Oqtane.Providers
|
||||||
|
|
||||||
public IdentityAuthenticationStateProvider(NavigationManager NavigationManager, SiteState sitestate, IServiceProvider provider)
|
public IdentityAuthenticationStateProvider(NavigationManager NavigationManager, SiteState sitestate, IServiceProvider provider)
|
||||||
{
|
{
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._serviceProvider = provider;
|
_serviceProvider = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
|
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
|
||||||
|
|
|
@ -18,9 +18,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public AliasService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public AliasService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public FileService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager, IJSRuntime jsRuntime)
|
public FileService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager, IJSRuntime jsRuntime)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
this._jsRuntime = jsRuntime;
|
_jsRuntime = jsRuntime;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -17,9 +17,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public FolderService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public FolderService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public InstallationService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public InstallationService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public JobLogService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public JobLogService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this.http = http;
|
http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public JobService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public JobService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -17,9 +17,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public LogService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public LogService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -18,9 +18,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public ModuleDefinitionService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public ModuleDefinitionService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public ModuleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public ModuleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public NotificationService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public NotificationService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public PackageService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public PackageService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public PageModuleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public PageModuleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -17,9 +17,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public PageService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public PageService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public ProfileService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public ProfileService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public RoleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public RoleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public SettingService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public SettingService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public SiteService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public SiteService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public TenantService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public TenantService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -18,9 +18,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public ThemeService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public ThemeService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -16,9 +16,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public UserRoleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public UserRoleService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -14,9 +14,9 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
public UserService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
public UserService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||||
{
|
{
|
||||||
this._http = http;
|
_http = http;
|
||||||
this._siteState = sitestate;
|
_siteState = sitestate;
|
||||||
this._navigationManager = NavigationManager;
|
_navigationManager = NavigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string apiurl
|
private string apiurl
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Oqtane.Shared
|
||||||
|
|
||||||
public Interop(IJSRuntime jsRuntime)
|
public Interop(IJSRuntime jsRuntime)
|
||||||
{
|
{
|
||||||
this._jsRuntime = jsRuntime;
|
_jsRuntime = jsRuntime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task SetCookie(string name, string value, int days)
|
public Task SetCookie(string name, string value, int days)
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine(this.GetType().FullName + ": Error: API call to " + _absoluteUri + " is not mapped to a Controller");
|
System.Diagnostics.Debug.WriteLine(GetType().FullName + ": Error: API call to " + _absoluteUri + " is not mapped to a Controller");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Oqtane.Themes
|
||||||
|
|
||||||
public string ThemePath()
|
public string ThemePath()
|
||||||
{
|
{
|
||||||
return "Themes/" + this.GetType().Namespace + "/";
|
return "Themes/" + GetType().Namespace + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string NavigateUrl()
|
public string NavigateUrl()
|
||||||
|
|
|
@ -459,19 +459,19 @@
|
||||||
{
|
{
|
||||||
page.IsDeleted = true;
|
page.IsDeleted = true;
|
||||||
await PageService.UpdatePageAsync(page);
|
await PageService.UpdatePageAsync(page);
|
||||||
await logger.Log(page.PageId, null, PageState.User.UserId, this.GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, null, "Page Deleted {Page}", page);
|
await logger.Log(page.PageId, null, PageState.User.UserId, GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, null, "Page Deleted {Page}", page);
|
||||||
NavigationManager.NavigateTo(NavigateUrl("", Reload.Site));
|
NavigationManager.NavigateTo(NavigateUrl("", Reload.Site));
|
||||||
}
|
}
|
||||||
else // personalized page
|
else // personalized page
|
||||||
{
|
{
|
||||||
await PageService.DeletePageAsync(page.PageId);
|
await PageService.DeletePageAsync(page.PageId);
|
||||||
await logger.Log(page.PageId, null, PageState.User.UserId, this.GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, null, "Page Deleted {Page}", page);
|
await logger.Log(page.PageId, null, PageState.User.UserId, GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, null, "Page Deleted {Page}", page);
|
||||||
NavigationManager.NavigateTo(NavigateUrl(Reload.Page));
|
NavigationManager.NavigateTo(NavigateUrl(Reload.Page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
await logger.Log(page.PageId, null, PageState.User.UserId, this.GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, ex, "Page Deleted {Page} {Error}", page, ex.Message);
|
await logger.Log(page.PageId, null, PageState.User.UserId, GetType().AssemblyQualifiedName, "ControlPanel", LogFunction.Delete, LogLevel.Information, ex, "Page Deleted {Page} {Error}", page, ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Oqtane.Themes
|
||||||
|
|
||||||
public string LayoutPath()
|
public string LayoutPath()
|
||||||
{
|
{
|
||||||
return "Themes/" + this.GetType().Namespace + "/";
|
return "Themes/" + GetType().Namespace + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Oqtane.Themes
|
||||||
|
|
||||||
public string ThemePath()
|
public string ThemePath()
|
||||||
{
|
{
|
||||||
return "Themes/" + this.GetType().Namespace + "/";
|
return "Themes/" + GetType().Namespace + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task IncludeCSS(string Url)
|
public async Task IncludeCSS(string Url)
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public AliasController(IAliasRepository Aliases, ILogManager logger)
|
public AliasController(IAliasRepository Aliases, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._aliases = Aliases;
|
_aliases = Aliases;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -29,12 +29,12 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public FileController(IWebHostEnvironment environment, IFileRepository Files, IFolderRepository Folders, IUserPermissions UserPermissions, ITenantResolver Tenants, ILogManager logger)
|
public FileController(IWebHostEnvironment environment, IFileRepository Files, IFolderRepository Folders, IUserPermissions UserPermissions, ITenantResolver Tenants, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
this._files = Files;
|
_files = Files;
|
||||||
this._folders = Folders;
|
_folders = Folders;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._tenants = Tenants;
|
_tenants = Tenants;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?folder=x
|
// GET: api/<controller>?folder=x
|
||||||
|
|
|
@ -19,9 +19,9 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public FolderController(IFolderRepository Folders, IUserPermissions UserPermissions, ILogManager logger)
|
public FolderController(IFolderRepository Folders, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._folders = Folders;
|
_folders = Folders;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -24,8 +24,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public InstallationController(IConfigurationRoot Config, IInstallationManager InstallationManager)
|
public InstallationController(IConfigurationRoot Config, IInstallationManager InstallationManager)
|
||||||
{
|
{
|
||||||
this._config = Config;
|
_config = Config;
|
||||||
this._installationManager = InstallationManager;
|
_installationManager = InstallationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST api/<controller>
|
// POST api/<controller>
|
||||||
|
|
|
@ -20,9 +20,9 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public JobController(IJobRepository Jobs, ILogManager logger, IServiceProvider ServiceProvider)
|
public JobController(IJobRepository Jobs, ILogManager logger, IServiceProvider ServiceProvider)
|
||||||
{
|
{
|
||||||
this._jobs = Jobs;
|
_jobs = Jobs;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
this._serviceProvider = ServiceProvider;
|
_serviceProvider = ServiceProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public JobLogController(IJobLogRepository JobLogs, ILogManager logger)
|
public JobLogController(IJobLogRepository JobLogs, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._jobLogs = JobLogs;
|
_jobLogs = JobLogs;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public LogController(ILogManager Logger, ILogRepository Logs)
|
public LogController(ILogManager Logger, ILogRepository Logs)
|
||||||
{
|
{
|
||||||
this._ogger = Logger;
|
_ogger = Logger;
|
||||||
this._logs = Logs;
|
_logs = Logs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x&level=y&function=z&rows=50
|
// GET: api/<controller>?siteid=x&level=y&function=z&rows=50
|
||||||
|
|
|
@ -22,11 +22,11 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public ModuleController(IModuleRepository Modules, IPageModuleRepository PageModules, IModuleDefinitionRepository ModuleDefinitions, IUserPermissions UserPermissions, ILogManager logger)
|
public ModuleController(IModuleRepository Modules, IPageModuleRepository PageModules, IModuleDefinitionRepository ModuleDefinitions, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._modules = Modules;
|
_modules = Modules;
|
||||||
this._pageModules = PageModules;
|
_pageModules = PageModules;
|
||||||
this._moduleDefinitions = ModuleDefinitions;
|
_moduleDefinitions = ModuleDefinitions;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -24,11 +24,11 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public ModuleDefinitionController(IModuleDefinitionRepository ModuleDefinitions, IUserPermissions UserPermissions, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
|
public ModuleDefinitionController(IModuleDefinitionRepository ModuleDefinitions, IUserPermissions UserPermissions, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._moduleDefinitions = ModuleDefinitions;
|
_moduleDefinitions = ModuleDefinitions;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._installationManager = InstallationManager;
|
_installationManager = InstallationManager;
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -19,9 +19,9 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public NotificationController(INotificationRepository Notifications, IUserPermissions UserPermissions, ILogManager logger)
|
public NotificationController(INotificationRepository Notifications, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._notifications = Notifications;
|
_notifications = Notifications;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x&type=y&userid=z
|
// GET: api/<controller>?siteid=x&type=y&userid=z
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public PackageController(IWebHostEnvironment environment)
|
public PackageController(IWebHostEnvironment environment)
|
||||||
{
|
{
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?tag=x
|
// GET: api/<controller>?tag=x
|
||||||
|
|
|
@ -21,11 +21,11 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public PageController(IPageRepository Pages, IModuleRepository Modules, IPageModuleRepository PageModules, IUserPermissions UserPermissions, ILogManager logger)
|
public PageController(IPageRepository Pages, IModuleRepository Modules, IPageModuleRepository PageModules, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._pages = Pages;
|
_pages = Pages;
|
||||||
this._modules = Modules;
|
_modules = Modules;
|
||||||
this._pageModules = PageModules;
|
_pageModules = PageModules;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -20,10 +20,10 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public PageModuleController(IPageModuleRepository PageModules, IModuleRepository Modules, IUserPermissions UserPermissions, ILogManager logger)
|
public PageModuleController(IPageModuleRepository PageModules, IModuleRepository Modules, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._pageModules = PageModules;
|
_pageModules = PageModules;
|
||||||
this._modules = Modules;
|
_modules = Modules;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET api/<controller>/5
|
// GET api/<controller>/5
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public ProfileController(IProfileRepository Profiles, ILogManager logger)
|
public ProfileController(IProfileRepository Profiles, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._profiles = Profiles;
|
_profiles = Profiles;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public RoleController(IRoleRepository Roles, ILogManager logger)
|
public RoleController(IRoleRepository Roles, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._roles = Roles;
|
_roles = Roles;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?siteid=x
|
// GET: api/<controller>?siteid=x
|
||||||
|
|
|
@ -20,10 +20,10 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public SettingController(ISettingRepository Settings, IPageModuleRepository PageModules, IUserPermissions UserPermissions, ILogManager logger)
|
public SettingController(ISettingRepository Settings, IPageModuleRepository PageModules, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._settings = Settings;
|
_settings = Settings;
|
||||||
this._pageModules = PageModules;
|
_pageModules = PageModules;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -21,10 +21,10 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public SiteController(ISiteRepository Sites, ITenantResolver Tenants, IWebHostEnvironment environment, ILogManager logger)
|
public SiteController(ISiteRepository Sites, ITenantResolver Tenants, IWebHostEnvironment environment, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._sites = Sites;
|
_sites = Sites;
|
||||||
this._tenants = Tenants;
|
_tenants = Tenants;
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public TenantController(ITenantRepository Tenants, ILogManager logger)
|
public TenantController(ITenantRepository Tenants, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._tenants = Tenants;
|
_tenants = Tenants;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
|
public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._themes = Themes;
|
_themes = Themes;
|
||||||
this._installationManager = InstallationManager;
|
_installationManager = InstallationManager;
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>
|
// GET: api/<controller>
|
||||||
|
|
|
@ -31,15 +31,15 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public UserController(IUserRepository Users, IRoleRepository Roles, IUserRoleRepository UserRoles, UserManager<IdentityUser> IdentityUserManager, SignInManager<IdentityUser> IdentitySignInManager, ITenantResolver Tenants, INotificationRepository Notifications, IFolderRepository Folders, ILogManager logger)
|
public UserController(IUserRepository Users, IRoleRepository Roles, IUserRoleRepository UserRoles, UserManager<IdentityUser> IdentityUserManager, SignInManager<IdentityUser> IdentitySignInManager, ITenantResolver Tenants, INotificationRepository Notifications, IFolderRepository Folders, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._users = Users;
|
_users = Users;
|
||||||
this._roles = Roles;
|
_roles = Roles;
|
||||||
this._userRoles = UserRoles;
|
_userRoles = UserRoles;
|
||||||
this._identityUserManager = IdentityUserManager;
|
_identityUserManager = IdentityUserManager;
|
||||||
this._identitySignInManager = IdentitySignInManager;
|
_identitySignInManager = IdentitySignInManager;
|
||||||
this._tenants = Tenants;
|
_tenants = Tenants;
|
||||||
this._folders = Folders;
|
_folders = Folders;
|
||||||
this._notifications = Notifications;
|
_notifications = Notifications;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET api/<controller>/5?siteid=x
|
// GET api/<controller>/5?siteid=x
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace Oqtane.Controllers
|
||||||
|
|
||||||
public UserRoleController(IUserRoleRepository UserRoles, ILogManager logger)
|
public UserRoleController(IUserRoleRepository UserRoles, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._userRoles = UserRoles;
|
_userRoles = UserRoles;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/<controller>?userid=x
|
// GET: api/<controller>?userid=x
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
public InstallationManager(IHostApplicationLifetime HostApplicationLifetime, IWebHostEnvironment environment)
|
public InstallationManager(IHostApplicationLifetime HostApplicationLifetime, IWebHostEnvironment environment)
|
||||||
{
|
{
|
||||||
this._hostApplicationLifetime = HostApplicationLifetime;
|
_hostApplicationLifetime = HostApplicationLifetime;
|
||||||
this._environment = environment;
|
_environment = environment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InstallPackages(string Folders, bool Restart)
|
public void InstallPackages(string Folders, bool Restart)
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
public HostedServiceBase(IServiceScopeFactory ServiceScopeFactory)
|
public HostedServiceBase(IServiceScopeFactory ServiceScopeFactory)
|
||||||
{
|
{
|
||||||
this._serviceScopeFactory = ServiceScopeFactory;
|
_serviceScopeFactory = ServiceScopeFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
// abstract method must be overridden
|
// abstract method must be overridden
|
||||||
|
@ -34,7 +34,7 @@ namespace Oqtane.Infrastructure
|
||||||
using (var scope = _serviceScopeFactory.CreateScope())
|
using (var scope = _serviceScopeFactory.CreateScope())
|
||||||
{
|
{
|
||||||
// get name of job
|
// get name of job
|
||||||
string JobType = Utilities.GetFullTypeName(this.GetType().AssemblyQualifiedName);
|
string JobType = Utilities.GetFullTypeName(GetType().AssemblyQualifiedName);
|
||||||
|
|
||||||
// load jobs and find current job
|
// load jobs and find current job
|
||||||
IJobRepository Jobs = scope.ServiceProvider.GetRequiredService<IJobRepository>();
|
IJobRepository Jobs = scope.ServiceProvider.GetRequiredService<IJobRepository>();
|
||||||
|
@ -146,7 +146,7 @@ namespace Oqtane.Infrastructure
|
||||||
// set IsExecuting to false in case this job was forcefully terminated previously
|
// set IsExecuting to false in case this job was forcefully terminated previously
|
||||||
using (var scope = _serviceScopeFactory.CreateScope())
|
using (var scope = _serviceScopeFactory.CreateScope())
|
||||||
{
|
{
|
||||||
string JobType = Utilities.GetFullTypeName(this.GetType().AssemblyQualifiedName);
|
string JobType = Utilities.GetFullTypeName(GetType().AssemblyQualifiedName);
|
||||||
IJobRepository Jobs = scope.ServiceProvider.GetRequiredService<IJobRepository>();
|
IJobRepository Jobs = scope.ServiceProvider.GetRequiredService<IJobRepository>();
|
||||||
Job Job = Jobs.GetJobs().Where(item => item.JobType == JobType).FirstOrDefault();
|
Job Job = Jobs.GetJobs().Where(item => item.JobType == JobType).FirstOrDefault();
|
||||||
if (Job != null)
|
if (Job != null)
|
||||||
|
|
|
@ -20,11 +20,11 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
public LogManager(ILogRepository Logs, ITenantResolver TenantResolver, IConfigurationRoot Config, IUserPermissions UserPermissions, IHttpContextAccessor Accessor)
|
public LogManager(ILogRepository Logs, ITenantResolver TenantResolver, IConfigurationRoot Config, IUserPermissions UserPermissions, IHttpContextAccessor Accessor)
|
||||||
{
|
{
|
||||||
this._logs = Logs;
|
_logs = Logs;
|
||||||
this._tenantResolver = TenantResolver;
|
_tenantResolver = TenantResolver;
|
||||||
this._config = Config;
|
_config = Config;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._accessor = Accessor;
|
_accessor = Accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Log(LogLevel Level, object Class, LogFunction Function, string Message, params object[] Args)
|
public void Log(LogLevel Level, object Class, LogFunction Function, string Message, params object[] Args)
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace Oqtane.Modules.HtmlText.Controllers
|
||||||
public HtmlTextController(IHtmlTextRepository HtmlText, ILogManager logger, IHttpContextAccessor HttpContextAccessor)
|
public HtmlTextController(IHtmlTextRepository HtmlText, ILogManager logger, IHttpContextAccessor HttpContextAccessor)
|
||||||
{
|
{
|
||||||
_htmlText = HtmlText;
|
_htmlText = HtmlText;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
if (HttpContextAccessor.HttpContext.Request.Query.ContainsKey("entityid"))
|
if (HttpContextAccessor.HttpContext.Request.Query.ContainsKey("entityid"))
|
||||||
{
|
{
|
||||||
_entityId = int.Parse(HttpContextAccessor.HttpContext.Request.Query["entityid"]);
|
_entityId = int.Parse(HttpContextAccessor.HttpContext.Request.Query["entityid"]);
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Oqtane.Modules.HtmlText.Manager
|
||||||
|
|
||||||
public HtmlTextManager(IHtmlTextRepository htmltexts)
|
public HtmlTextManager(IHtmlTextRepository htmltexts)
|
||||||
{
|
{
|
||||||
this._htmlTexts = htmltexts;
|
_htmlTexts = htmltexts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ExportModule(Module Module)
|
public string ExportModule(Module Module)
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace Oqtane.Pages
|
||||||
|
|
||||||
public LoginModel(UserManager<IdentityUser> IdentityUserManager, SignInManager<IdentityUser> IdentitySignInManager)
|
public LoginModel(UserManager<IdentityUser> IdentityUserManager, SignInManager<IdentityUser> IdentitySignInManager)
|
||||||
{
|
{
|
||||||
this.IdentityUserManager = IdentityUserManager;
|
IdentityUserManager = IdentityUserManager;
|
||||||
this.IdentitySignInManager = IdentitySignInManager;
|
IdentitySignInManager = IdentitySignInManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IActionResult> OnPostAsync(string username, string password, bool remember, string returnurl)
|
public async Task<IActionResult> OnPostAsync(string username, string password, bool remember, string returnurl)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Oqtane.Repository
|
||||||
public DBContextBase(ITenantResolver TenantResolver, IHttpContextAccessor accessor)
|
public DBContextBase(ITenantResolver TenantResolver, IHttpContextAccessor accessor)
|
||||||
{
|
{
|
||||||
_tenant = TenantResolver.GetTenant();
|
_tenant = TenantResolver.GetTenant();
|
||||||
this._accessor = accessor;
|
_accessor = accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Oqtane.Repository
|
||||||
|
|
||||||
public MasterDBContext(DbContextOptions<MasterDBContext> options, IHttpContextAccessor accessor) : base(options)
|
public MasterDBContext(DbContextOptions<MasterDBContext> options, IHttpContextAccessor accessor) : base(options)
|
||||||
{
|
{
|
||||||
this._accessor = accessor;
|
_accessor = accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual DbSet<Alias> Alias { get; set; }
|
public virtual DbSet<Alias> Alias { get; set; }
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Oqtane.Repository
|
||||||
public FileRepository(TenantDBContext context, IPermissionRepository Permissions)
|
public FileRepository(TenantDBContext context, IPermissionRepository Permissions)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<File> GetFiles(int FolderId)
|
public IEnumerable<File> GetFiles(int FolderId)
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Oqtane.Repository
|
||||||
public FolderRepository(TenantDBContext context, IPermissionRepository Permissions)
|
public FolderRepository(TenantDBContext context, IPermissionRepository Permissions)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Folder> GetFolders(int SiteId)
|
public IEnumerable<Folder> GetFolders(int SiteId)
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Oqtane.Repository
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
_cache = cache;
|
_cache = cache;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<ModuleDefinition> GetModuleDefinitions(int SiteId)
|
public IEnumerable<ModuleDefinition> GetModuleDefinitions(int SiteId)
|
||||||
|
|
|
@ -20,9 +20,9 @@ namespace Oqtane.Repository
|
||||||
public ModuleRepository(TenantDBContext context, IPermissionRepository Permissions, IModuleDefinitionRepository ModuleDefinitions, IServiceProvider ServiceProvider)
|
public ModuleRepository(TenantDBContext context, IPermissionRepository Permissions, IModuleDefinitionRepository ModuleDefinitions, IServiceProvider ServiceProvider)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
this._moduleDefinitions = ModuleDefinitions;
|
_moduleDefinitions = ModuleDefinitions;
|
||||||
this._serviceProvider = ServiceProvider;
|
_serviceProvider = ServiceProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Models.Module> GetModules(int SiteId)
|
public IEnumerable<Models.Module> GetModules(int SiteId)
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Oqtane.Repository
|
||||||
public PageModuleRepository(TenantDBContext context, IPermissionRepository Permissions)
|
public PageModuleRepository(TenantDBContext context, IPermissionRepository Permissions)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<PageModule> GetPageModules(int SiteId)
|
public IEnumerable<PageModule> GetPageModules(int SiteId)
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace Oqtane.Repository
|
||||||
public PageRepository(TenantDBContext context, IPermissionRepository Permissions, IPageModuleRepository PageModules)
|
public PageRepository(TenantDBContext context, IPermissionRepository Permissions, IPageModuleRepository PageModules)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
this._pageModules = PageModules;
|
_pageModules = PageModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Page> GetPages(int SiteId)
|
public IEnumerable<Page> GetPages(int SiteId)
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Oqtane.Repository
|
||||||
public PermissionRepository(TenantDBContext context, IRoleRepository Roles)
|
public PermissionRepository(TenantDBContext context, IRoleRepository Roles)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._roles = Roles;
|
_roles = Roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Permission> GetPermissions(int SiteId, string EntityName)
|
public IEnumerable<Permission> GetPermissions(int SiteId, string EntityName)
|
||||||
|
|
|
@ -27,15 +27,15 @@ namespace Oqtane.Repository
|
||||||
public SiteRepository(TenantDBContext context, IRoleRepository RoleRepository, IProfileRepository ProfileRepository, IFolderRepository FolderRepository, IFileRepository FileRepository, IPageRepository PageRepository, IModuleRepository ModuleRepository, IPageModuleRepository PageModuleRepository, IModuleDefinitionRepository ModuleDefinitionRepository, IServiceProvider ServiceProvider)
|
public SiteRepository(TenantDBContext context, IRoleRepository RoleRepository, IProfileRepository ProfileRepository, IFolderRepository FolderRepository, IFileRepository FileRepository, IPageRepository PageRepository, IModuleRepository ModuleRepository, IPageModuleRepository PageModuleRepository, IModuleDefinitionRepository ModuleDefinitionRepository, IServiceProvider ServiceProvider)
|
||||||
{
|
{
|
||||||
_db = context;
|
_db = context;
|
||||||
this._roleRepository = RoleRepository;
|
_roleRepository = RoleRepository;
|
||||||
this._profileRepository = ProfileRepository;
|
_profileRepository = ProfileRepository;
|
||||||
this._folderRepository = FolderRepository;
|
_folderRepository = FolderRepository;
|
||||||
this._fileRepository = FileRepository;
|
_fileRepository = FileRepository;
|
||||||
this._pageRepository = PageRepository;
|
_pageRepository = PageRepository;
|
||||||
this._moduleRepository = ModuleRepository;
|
_moduleRepository = ModuleRepository;
|
||||||
this._pageModuleRepository = PageModuleRepository;
|
_pageModuleRepository = PageModuleRepository;
|
||||||
this._moduleDefinitionRepository = ModuleDefinitionRepository;
|
_moduleDefinitionRepository = ModuleDefinitionRepository;
|
||||||
this._serviceProvider = ServiceProvider;
|
_serviceProvider = ServiceProvider;
|
||||||
|
|
||||||
// define the default site template
|
// define the default site template
|
||||||
_siteTemplate = new List<PageTemplate>();
|
_siteTemplate = new List<PageTemplate>();
|
||||||
|
|
|
@ -14,9 +14,9 @@ namespace Oqtane.Security
|
||||||
|
|
||||||
public PermissionHandler(IHttpContextAccessor HttpContextAccessor, IUserPermissions UserPermissions, ILogManager logger)
|
public PermissionHandler(IHttpContextAccessor HttpContextAccessor, IUserPermissions UserPermissions, ILogManager logger)
|
||||||
{
|
{
|
||||||
this._httpContextAccessor = HttpContextAccessor;
|
_httpContextAccessor = HttpContextAccessor;
|
||||||
this._userPermissions = UserPermissions;
|
_userPermissions = UserPermissions;
|
||||||
this._logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, PermissionRequirement requirement)
|
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, PermissionRequirement requirement)
|
||||||
|
|
|
@ -10,8 +10,8 @@ namespace Oqtane.Security
|
||||||
|
|
||||||
public PermissionRequirement(string EntityName, string PermissionName)
|
public PermissionRequirement(string EntityName, string PermissionName)
|
||||||
{
|
{
|
||||||
this.EntityName = EntityName;
|
EntityName = EntityName;
|
||||||
this.PermissionName = PermissionName;
|
PermissionName = PermissionName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@ namespace Oqtane.Security
|
||||||
|
|
||||||
public UserPermissions(IPermissionRepository Permissions, IHttpContextAccessor Accessor)
|
public UserPermissions(IPermissionRepository Permissions, IHttpContextAccessor Accessor)
|
||||||
{
|
{
|
||||||
this._permissions = Permissions;
|
_permissions = Permissions;
|
||||||
this._accessor = Accessor;
|
_accessor = Accessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsAuthorized(ClaimsPrincipal User, string EntityName, int EntityId, string PermissionName)
|
public bool IsAuthorized(ClaimsPrincipal User, string EntityName, int EntityId, string PermissionName)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user