Skip to content

Commit

Permalink
Forum posts - do not show poster's Experienced Forum User role, resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Mar 10, 2024
1 parent 0cfc92a commit 11e0935
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TASVideos/Pages/Forum/Topics/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ public async Task<IActionResult> OnGet()
PosterLocation = p.Poster.From,
PosterRoles = p.Poster.UserRoles
.Where(ur => !ur.Role!.IsDefault)

// TODO: these violate separation of concerns, the code should not be aware of the specifics of what roles exist, as those can be any value a user chooses
.Where(ur => ur.Role!.Name != "Published Author")
.Where(ur => ur.Role!.Name != "Experienced Forum User")
.Select(ur => ur.Role!.Name)
.ToList(),
PosterJoined = p.Poster.CreateTimestamp,
Expand Down

0 comments on commit 11e0935

Please sign in to comment.