Base solution for your next web application
Open Closed

Refreshing Currently Logged in User Permissions #1788


User avatar
0
derekmcclure created

Hello,

Currently if a user edits their own permissions, the abp.auth.hasPermission client side function will return the original result. It seems the permissions are cached. Is there a way to force a cache refresh?

Thanks,

Derek McClure


1 Answer(s)
  • User Avatar
    0
    slavautesinov created

    Permissions are loaded once at start from script as object(abp.auth.grantedPermissions). To refresh permissions reload this script with them (and some other additional data) with the help of, for example jQuery's method:

    $.getScript("AbpScripts/GetScripts")