Refresh Permissions after Role Change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kurt
    Member
    • Jan 2018
    • 37

    Refresh Permissions after Role Change

    As part of our application flow we were planning on switching the user's role once they agree to our terms of service, such that they get additional permissions allowing them to create/edit other entities. We've run into two problems though:

    1) It appears the permissions don't get updated unless the back end cache is cleared.

    2) We are running multiple instances of Espo, and the cache is not currently shared between them (since shared file system is slower and it's unclear whether that would be safe for the application). Even if I did try to clear the back end cache every time permissions changed, we would somehow have to find a way to get the request to propagate to all servers. The servers can be rotated over time for scaling reasons, so this starts to get complicated.

    A few questions:

    Is there a way to have permissions *not* be cached?

    Is there a way to clear only the permissions part of the cache?

    Is there a way to refresh the permissions at the start of specific entity requests?

    I'm open to solutions that modify core code as well.

    Thanks for your help.

  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    you can clear role cache for particular user
    EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

    but you need to refresh the page for this user.

    Comment

    Working...