Base solution for your next web application
Open Closed

Menus and actions shown when permissions not granted #2224


User avatar
0
pradippatil created

Hi,

I have created one role and given it permissions of Roles screen's few actions such as Create. But it still shows Actions button with Edit and Delete option, for which I have not granted permissions to that role.

I have checked in js object (abp.auth.grantedPermissions), it also shows Edit and Delete permissions which I have not granted.

Can anyone say why this is happening?

I tried to check in code in GitHub repository, but I was not able to find definition of PermissionChecker.IsGrantedAsync method. It has only implemented in NullPermissionChecker and not able to find PermissionChecker class.

Also, how update permission cache when permissions of role changed?

Any quick help will be much appreciated!

Thanks


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Does it still show buttons when you refresh the page ?

  • User Avatar
    0
    pradippatil created

    First issue has been resolved, it was due to old data.

    How to update permission cache when permissions of role changed?

    Thanks

  • User Avatar
    0
    pradippatil created

    Hi,

    Can anyone help me on this?

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can clear the cache like this, then it will be refreshed next time you use it.

    var cache = _cacheManager.GetCache("AbpZeroRolePermissions");
    await cache.ClearAsync();
    
  • User Avatar
    0
    pradippatil created

    Okay, Thanks!

    I would like to know when permissions inserted in cache? I mean which event and class

    Thanks