authz: Bitbucket Server Permissions store fixes
Created by: tsenart
This PR is a follow up to #5180 that fixes two things:
-
A test flake that manifested when more than one process acquired the lock (i.e. one after then other, not simultaneously), others would detect that the first had already updated permissions and would return early, which resulted in an update being sent to the updates channel, which wasn't intended.
-
Replacing the cast function with a simple
int32
conversion.