Activities of "alexander.nikonov"

hi

You can use IPermissionDefinitionManager to get all permission definitions.

It does not return "all" permission definitions. It only returns the definitions of the current application plus the definitions from the modules which I consumed as Nuget packages (including ABP permissions, of course).

But I was talking about ALL the permission definitions from ALL running applications. Otherwise what is the point of using Redis cache, which supposedly has to store ALL such permissions?

I need to manage ALL the permissions from ALL running applications using Permission Management page on one of my portals, but those changes need to be spread across all the running applications straight after.

AbpOpenIddictStoreOptions

No luck so far:

using Volo.Abp.OpenIddict;

hi

IsolationLevel must be ReadCommitted or Serializable (Parameter 'isolationLevel')

Please configure AbpOpenIddictStoreOptions to set the IsolationLevel for your Oracle.

public class AbpOpenIddictStoreOptions 
{ 
    public IsolationLevel? PruneIsolationLevel { get; set; } 
 
    public IsolationLevel? DeleteIsolationLevel { get; set; } 
 
    public AbpOpenIddictStoreOptions() 
    { 
        PruneIsolationLevel = IsolationLevel.RepeatableRead; 
        DeleteIsolationLevel = IsolationLevel.Serializable; 
    } 
} 
 
  1. I can't find the way to add these options in my AuthServerModule. Logically, I've tried to use PreConfigureServices, but got lost among numerous extensions. BTW, the documentation does not describe it well either (https://abp.io/docs/latest/Modules/OpenIddict);
  2. Do i need to retain RepeatableRead for PruneIsolationLevel?

hi

You should use the services related to ABP permission management instead of directly reading/writing to the Redis cache.

I didn't intend to use some non-standard methods. I started from usual IPermissionManager methods. But it only returns me "per-application" permissions, not all. Please give me a real example of the code which would return the permissions for ALL the running applications.

Currently the above scenario did not help me reproduce the exception. I need to wait for another team member who managed to reproduce it such way. Please, wait and do not close the ticket.

Though, I was able to get another kind of exception. Please have a look at this one so far.

Is there a way to turn off DB storage instead? We're going to have many large articles and prefer to deal with the file system directly.

I've revealed the additional custom protection mechanism in our project, related to company-licence, i.e. I've found the root cause and it is not related to ABP permissions. Please, restore the points and close the ticket. Sorry.

@liangshiwei - ok, if you are sure that this is solely EF Core / Oracle issue, please close the ticket and restore the points. Thanks.

I have identified the root cause of the problem. There were indeed like two caches.

By chance I have noticed that IDistributedCache has IgnoreMultiTenancy property. It is false by default. It should be true, since my cache item stores data for all tenants of the apps. ApplicationService works under specific tenant (of the current user), but not RabbitMqReceiver.

I even was not aware about this feature of the cache. So when I set it to true - the cache started working as expected.

Could you please reimburse the points for this ticket and close it? Thank you.

I have created the example. But I was unable to reproduce the problem which exists in our application: in the test app, a memory cache is shared between application layers (as expected) and the data is not re-read from DB, even if the item has already been put to cache from by a call from different tier. So I don't know what to do next. I cannot share the source code.

I have a bunch of cache instances, which store various parameters - with long expiration:

        var cockpitCacheNotificationItem = await cockpitNotificationCache.GetOrAddAsync
        (
            CockpitNotificationCacheItem.Key,
            GetCockpitNotificationCacheAsync,
            () => new DistributedCacheEntryOptions
            {
                AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(365)
            }
        );

All of such are singleton DI, residing - as well as CacheManager - on Application tier. And all are missed (re-read from DB) when they actually should be present in the cache. But ONLY if I invoke the cache operations via CacheManager instance which is retrieved on HttpApi.Host tier (no matter this way: serviceProvider.GetRequiredService<CacheManager>() or this way: serviceProvider.GetRequiredService<IHost>.Services.GetRequiredService<CacheManager>())

Showing 41 to 50 of 276 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30