handle multi repo permission caching correctly