mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 10:58:38 +00:00
Miscellaneous website/moderation/notification fixes (#940)
This commit is contained in:
parent
0de5edca6e
commit
69855406f5
4 changed files with 11 additions and 11 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue