I created some new permissions in my AuthorizationProvider and assigned them to some navigation nodes. But when I add them to the table in the DB it doesnt take affect until I restart the app pool? This doesnt seem normal, am I missing something someplace?
Once i restart the app pool/VS the nodes appear just fine. Do I need to call a method just for testing until I build out the role/permissions screens?
3 Answer(s)
-
0
Hi,
Permissions are cached, so you need to clear the cache or restart your app. This is normal if you add those records by hand.
You can manage this case when you develop user/role permission assignments screens.
-
0
Can you point me in the direction of what cache/method I need to call so I dont need to keep resting my app and can just create a simple end point for now :)
-
0
of course, you can inject ICacheManager into class you want, and then call one or both of these lines
_cacheManager.GetUserPermissionCache().Clear(); _cacheManager.GetRolePermissionCache().Clear();