Miscellaneous website/moderation/notification fixes (#940)

This commit is contained in:
sudokoko 2023-10-30 13:46:05 -04:00 committed by GitHub
commit 69855406f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View file

@ -52,7 +52,7 @@ public class UserPage : BaseLayout
bool isAuthenticated = this.User != null;
bool isOwner = this.ProfileUser == this.User || this.User != null && this.User.IsModerator;
// Determine if user can view profile according to profileUser's privacy settings
this.CanViewProfile = this.ProfileUser.ProfileVisibility.CanAccess(isAuthenticated, isOwner);
this.CanViewSlots = this.ProfileUser.LevelVisibility.CanAccess(isAuthenticated, isOwner);
@ -68,6 +68,7 @@ public class UserPage : BaseLayout
this.Slots = await this.Database.Slots.Include(p => p.Creator)
.OrderByDescending(s => s.LastUpdated)
.Where(p => p.CreatorId == userId)
.Where(p => p.Creator != null && (!p.SubLevel || p.Creator == this.User))
.Take(10)
.ToListAsync();