Skip to content

Commit

Permalink
fix: Fix Unreachable code detected warning in HasPermissionAuthorizat…
Browse files Browse the repository at this point in the history
…ionHandler
  • Loading branch information
kgrzybek committed Dec 16, 2023
1 parent fed5f5f commit 1cbb831
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ private Task<bool> AuthorizeAsync(string permission, List<UserPermissionDto> per
#if !DEBUG
return Task.FromResult(true);
#endif
#pragma warning disable CS0162 // Unreachable code detected
return Task.FromResult(permissions.Any(x => x.Code == permission));
#pragma warning restore CS0162 // Unreachable code detected
}
}
}

0 comments on commit 1cbb831

Please sign in to comment.