Open Closed

IFeatureChecker doesn't work when tenant changed via CurrentTenant.Change #8629


User avatar
0
BenS-FreshRF created
  • ABP Framework version: v8.3.2
  • UI Type: Blazor WASM
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
public async Task<< bool >> CheckTenantFeature(Guid tenantId, string feature) {
    using (CurrentTenant.Change(alert.TenantId))
    {
        return await IFeatureChecker.IsEnabledAsync(feature);
    }
}

In this case the FeatureChecker doesn't return the correct result for the tenant, it keeps returning false for features that have been enabled for that tenant.

How do we check if a specific tenant has a feature enabled?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Could you please share a test project with me? I will check it Thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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 September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.