Activities of "maliming"

hi

if the current user has logged in. This should always be the first contributor for the security.

https://abp.io/docs/latest/framework/architecture/multi-tenancy#default-tenant-resolvers

hi

We will support this case by https://github.com/abpframework/abp/pull/22632

You can add MyEditionFeatureValueProvider to fix it now.

public class FeatureTestDomainModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        //...

        PostConfigure<AbpFeatureOptions>(options =>
        {
            options.ValueProviders.InsertAfter(r => r == typeof(EditionFeatureValueProvider),
                typeof(MyEditionFeatureValueProvider)
            );
            options.ValueProviders.Remove<EditionFeatureValueProvider>();
        });

        //...
    }
}

using System.Security.Principal;
using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Saas.Tenants;

namespace FeatureTest;

public class MyEditionFeatureValueProvider : FeatureValueProvider
{
    public const string ProviderName = "E";

    public override string Name => ProviderName;

    protected ICurrentPrincipalAccessor PrincipalAccessor;

    protected ITenantRepository TenantRepository;

    protected ICurrentTenant CurrentTenant { get; }

    public MyEditionFeatureValueProvider(IFeatureStore featureStore, ICurrentPrincipalAccessor principalAccessor, ITenantRepository tenantRepository, ICurrentTenant currentTenant)
        : base(featureStore)
    {
        PrincipalAccessor = principalAccessor;
        TenantRepository = tenantRepository;
        CurrentTenant = currentTenant;
    }

    public override async Task<string?> GetOrNullAsync(FeatureDefinition feature)
    {
        var editionId = PrincipalAccessor.Principal?.FindEditionId();
        if (editionId == null)
        {
            if (!CurrentTenant.Id.HasValue)
            {
                return null;
            }

            var tenant = await TenantRepository.FindByIdAsync(CurrentTenant.Id.Value);
            if (tenant == null || !tenant.EditionId.HasValue)
            {
                return null;
            }

            editionId = tenant.EditionId;
        }

        return await FeatureStore.GetOrNullAsync(feature.Name, Name, editionId.Value.ToString());
    }
}

hi

Can you share your project source code?

I will download and check the code.

You can remove the environment code so I can reproduce it on my local.

liming.ma@volosoft.com

Thanks.

190 permission should be pretty quick. I think the issue still has to do with Redis.

You can try to disable the cache in PermissionStore?

using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;

namespace Volo.Abp.PermissionManagement;

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPermissionStore), typeof(PermissionStore), typeof(MyPermissionStore))]
public class MyPermissionStore : PermissionStore
{
    public MyPermissionStore(
        IPermissionGrantRepository permissionGrantRepository,
        IDistributedCache<PermissionGrantCacheItem> cache,
        IPermissionDefinitionManager permissionDefinitionManager)
        : base(permissionGrantRepository, cache, permissionDefinitionManager)
    {
    }

    public async override Task<bool> IsGrantedAsync(string name, string providerName, string providerKey)
    {
        using (PermissionGrantRepository.DisableTracking())
        {
            var permissionGrant = await PermissionGrantRepository.FindAsync(name, providerName, providerKey);
            return permissionGrant != null;
        }
    }
    
    public async override Task<MultiplePermissionGrantResult> IsGrantedAsync(string[] names, string providerName, string providerKey)
    {
        Check.NotNullOrEmpty(names, nameof(names));

        var result = new MultiplePermissionGrantResult();

        if (names.Length == 1)
        {
            var name = names.First();
            result.Result.Add(name, await IsGrantedAsync(names.First(), providerName, providerKey)
                ? PermissionGrantResult.Granted
                : PermissionGrantResult.Undefined);
            return result;
        }

        using (PermissionGrantRepository.DisableTracking())
        {
            var permissionGrants = await PermissionGrantRepository.GetListAsync(names, providerName, providerKey);
            foreach (var name in names)
            {
                result.Result.Add(name,
                    permissionGrants.Any(x => x.Name == name)
                        ? PermissionGrantResult.Granted
                        : PermissionGrantResult.Undefined);
            }

            return result;
        }
    }
}

I don't have many ideas.

I ran your project, and it works.

https://abp.io/support/questions/9350/Custom-ConnectionStringResolver-Issue#answer-3a1a07c1-789d-d7e0-e1c2-2bab8465974e

You're welcome.

好的, 支持团队会检查 9371 问题。

hi

It will be the same as NET 9, We will test NET 10 RC in August or September. And will upgrade to the official version as soon as possible, then release ABP 10.0.

https://github.com/abpframework/abp/issues/20561

请尝试把这个文件中的端口也一并修改

etc\abp-studio\run-profiles\Default.abprun.json

执行 dotnet run 命令应用程序输出的日志是什么?

改成其他的端口呢? 比如 40000

Showing 3421 to 3430 of 12921 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on November 02, 2026, 06:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.