Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Tenant IsLock Control #10612


User avatar
0
QuickApp created

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hi everyone, I added IsLock column to AbpTenants table. I want it to throw an error in API services if IsLock=true. How would you suggest I do this, considering best practices?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @QuickApp

    If you want to make this cehck for every request, you can write an ActionFilter for this. Also, you can get data from TenantCache and update the tenant info in the cache when a Tenant's IsLock field is updated using https://aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events.

    If you don't want to deal with the cache, you can directly get tenant using TenantManager and check its IsLocked field in the action filter.