Hello Guys, We are having an issue in which when administrator assign or remove admin role. The menus are not refreshing properly without logout and re-login.
We are looking for a solution in which it should refresh all menus and permission of logged user without logout.
Thank you
8 Answer(s)
-
0
Hi @ictadmin
Do you host more than one instance of your app or do you use Redis on your app ? Normally, menu should be refreshed when the user refreshes the page.
Thanks,
-
0
We are using on instance of app, menu is refreshing but it is not fetching all the authentication and authorizations objects properly.
one example of it, like if a super-admin grant admin role to a user, this below method await IsGrantedAsync(AppPermissions.Pages_Administration_Roles)
not identifying admin role.
-
0
Hi,
Normally, permissions are cached but when a user is granted a permission or role, this cache is invalidated. One last question, do you use Redis in your app ?
Thanks,
-
0
This is in our appsettings.json for both web and host projects
"Abp": { "RedisCache": { "ConnectionString": "localhost", "DatabaseId": -1 } },
-
0
Hi,
This doesn't show if Redis is used or not. Could you check if the below line is commented out in your app in {YourAppName}WebCoreModule.cs ?
//Uncomment this line to use Redis cache instead of in-memory cache. //See app.config for Redis configuration and connection string //Configuration.Caching.UseRedis(options => //{ // options.ConnectionString = _appConfiguration["Abp:RedisCache:ConnectionString"]; // options.DatabaseId = _appConfiguration.GetValue<int>("Abp:RedisCache:DatabaseId"); //});
-
0
I checked, We are not using Redis.
-
0
Hi @ictadmin
Thanks, we will try to reproduce this on our side and we will inform you.
-
0
Hi @ictadmin,
I couldn't reproduce the issue. Could you share your project with [email protected] ?