Permission changed webhook

Is there a way to register a webhook, or something similar, so that my addon would be notified whenever a user loses access to a specific jira project (ex: user X can’t view project Y anymore because that user was removed from a group, or maybe the project permission scheme changed etc) ?
I’ve tried using a webhook (with Project and User related events attached) but it doesn’t get called when I update the project permissions / project user and roles.

Not really, there are too many ways for somebody to lose access.

You’ll either need to do it at request time (whenever an admin loads a page or similar) and scan for the project access. In theory you could do it through a polling mechanism but that might be a bit overkill. My suggestion would be to do something through a web-panel and set a cookie on the user for a day or so when you’ve checked the access so you don’t have to do it more than once an hour etc.