Activities of "maliming"

hi

  • ABP SUITE version: vX.X.X

  • Steps to reproduce the issue:

Can you share some code of your event handler?

hi

Don't call application service in event handler. You can call the domain service that without the Authorization.

hi

We will evaluate this feature in 4.4.

hi

I think you can try to override the HeaderViewComponent of Lepton.

abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Themes\Lepton\Components\Header\MainNavbarBrandViewComponent.cs

abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Themes\Lepton\Components\Header\Default.cshtml

hi

You can custom the MenuManager service to order the menus.

https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/MenuManager.cs#L46

HI

Can you try to add typeof(IIdentityUserAppService) to ExposeServices attribute?

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserAppService), typeof(IIdentityUserAppService))]
public class CustomIdentityUserAppService : IdentityUserAppService

Solution before upgrade:

Use MyAbpValidationActionFilter to replace the build-in AbpValidationActionFilter.

using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Validation;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Reflection;
using Volo.Abp.Validation;

namespace MyCompanyName.MyProjectName.Web
{
    public class MyAbpValidationActionFilter : IAsyncActionFilter, ITransientDependency
    {
        public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
        {
            if (!context.ActionDescriptor.IsControllerAction() ||
                !context.ActionDescriptor.HasObjectResult())
            {
                await next();
                return;
            }

            if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(context.ActionDescriptor.GetMethodInfo()) != null)
            {
                await next();
                return;
            }

            if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(context.Controller.GetType()) != null)
            {
                await next();
                return;
            }

            if (context.ActionDescriptor.GetMethodInfo().DeclaringType != context.Controller.GetType())
            {
                var baseMethod = context.ActionDescriptor.GetMethodInfo();

                var overrideMethod = context.Controller.GetType().GetMethods().FirstOrDefault(x =>
                    x.DeclaringType == context.Controller.GetType() &&
                    x.Name == baseMethod.Name &&
                    x.ReturnType == baseMethod.ReturnType &&
                    x.GetParameters().Select(p => p.ToString()).SequenceEqual(baseMethod.GetParameters().Select(p => p.ToString())));

                if (overrideMethod != null)
                {
                    if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableValidationAttribute>(overrideMethod) != null)
                    {
                        await next();
                        return;
                    }
                }
            }

            context.HttpContext.RequestServices.GetRequiredService<IModelStateValidator>().Validate(context.ModelState);
            await next();
        }
    }
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
    var hostingEnvironment = context.Services.GetHostingEnvironment();
    var configuration = context.Services.GetConfiguration();

    PostConfigure<MvcOptions>(mvcOptions =>
    {
        mvcOptions.Filters.ReplaceOne(
            x => (x as ServiceFilterAttribute)?.ServiceType == typeof(AbpValidationActionFilter),
            new ServiceFilterAttribute(typeof(MyAbpValidationActionFilter)));
    });
}

Answer

You need confirm your email setting is correct.

Answer

hi

Those code are unnecessary. the email module will get the configuration automatically.

https://docs.abp.io/en/abp/latest/Emailing

This is test program, You can use it to confirm your email setting is correct.

https://github.com/abpframework/abp-samples/blob/master/EmailSendDemo/src/EmailSendDemo/Program.cs#L11

Showing 7051 to 7060 of 7745 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 25, 2024, 05:13