Check permissions in findBySha1() of file repo - fixes duplicate upload errors