Open Closed

Menu items not getting refreshed after the current user role is updated. #6888


User avatar
0
neethucp created

Hi, we need to refresh the blazor menu items after the current user role is updated. After the user role is updated, we are invoking ICurrentApplicationConfigurationCacheResetService ResetAsync method to reset the cache and call Challenge method as mentioned in this link. https://support.abp.io/QA/Questions/5537/Refresh-Token-in-Blazor-Server-App. It was working till abp v8.0.0 update. After updating abp to v8.0.0, the menu items are no longer getting refreshed. Can you please guide us on what has changed and how to fix this issue?

  • ABP Framework version: v8.0.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    we are invoking ICurrentApplicationConfigurationCacheResetService ResetAsync method to reset the cache a

    Can you check the Redis to see the ApplicationConfigurationDto cache?

    It was working till abp v8.0.0 update. After updating abp to v8.0.0, the menu items are no longer getting refreshed. Can you please guide us on what has changed and how to fix this issue?

    There are no changes in 8.0. How can I reproduce your problem in a new template project?

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    neethucp created

    Hi, The cache is getting cleared but after updating the role and invoking challenge method, the policies are not updated in the cache. It only appears if we log out and log in again. We have reproduced the issue in a template project. Can you please share the support email id so that we can sent it to you?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    liming.ma@volosoft.com

    Please include steps. Thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please update TestService as below:

    namespace TestProject8.Test
    {
        public class TestService: ApplicationService, ITestService
        {
            private IdentityUserManager _userManager;
            private IDistributedCache<AbpDynamicClaimCacheItem> _dynamicClaimCache;
    
            public TestService(IdentityUserManager userManager, IDistributedCache<AbpDynamicClaimCacheItem> dynamicClaimCache)
            {
                _userManager = userManager;
                _dynamicClaimCache = dynamicClaimCache;
            }
            public async Task AddToRoleAsync(Guid id)
            {
                var user = await _userManager.FindByIdAsync(id.ToString());
                if (user == null)
                {
                    return;
                }
                await _userManager.AddToRoleAsync(user, "External");
                await _dynamicClaimCache.RemoveAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(user.Id, user.TenantId));
            }
        }
    }
    
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    neethucp created

    It is working now. Thank you for the fix.

    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.