To persist single permission change, it needs to combine multiple things in a single transaction:
- Doing the actual operation (priv change)
- Updating notification ID.
It is important to do this in a single transaction to guarantee that notificationID handling is atomic. Current code structure doesn't allow for that.
So we need to pass extra transaction code to SentryStore functions or figure out a generic way to do this.