When unassigning, you know the current /user/ has permission
All you need to do is unconditionally add that user to the cache. I couldn't really make heads or tails of your logic - and it looks to do db lookups that aren't needed.
Sorry to be a wet blanket, but I think simpler is better here.
This seems much more complex than needed.
When unassigning, you know the current /user/ has permission
All you need to do is unconditionally add that user to the cache. I couldn't really make heads or tails of your logic - and it looks to do db lookups that aren't needed.
Sorry to be a wet blanket, but I think simpler is better here.