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