Allowed pages for external module.

Login internal module while edit, resolved error to be edit.
This commit is contained in:
Goti Ankit 2021-06-22 10:51:05 +05:30
parent 3274ab6258
commit d348e9715f
2 changed files with 5 additions and 3 deletions

View File

@ -95,7 +95,8 @@
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
if (firstRender && !(EqualityComparer<ElementReference>.Default.Equals(username,
default(ElementReference))))
{
await username.FocusAsync();
}

View File

@ -1,9 +1,10 @@
using System;
using System;
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Oqtane.Infrastructure;
using Microsoft.AspNetCore.Mvc.RazorPages;
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection
@ -22,7 +23,7 @@ namespace Microsoft.Extensions.DependencyInjection
foreach (var assembly in assemblies)
{
// check if assembly contains MVC Controllers
if (assembly.GetTypes().Any(t => t.IsSubclassOf(typeof(Controller))))
if (assembly.GetTypes().Any(t => t.IsSubclassOf(typeof(Controller)) || t.IsSubclassOf(typeof(Page))))
{
var partFactory = ApplicationPartFactory.GetApplicationPartFactory(assembly);
foreach (var part in partFactory.GetApplicationParts(assembly))