public void ThrowWhenCantReadContent(string path) { if (!_claimsRepository.CurrentUserHas(ClaimTypes.ReadContentClaim)) { throw new SecurityException($"Current user { WindowsIdentity.GetCurrent().Name } doesn't have the right to read the content of the path {path}"); } }