mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-16 10:11:28 +00:00
Allow moderators to moderate story levels (#809)
* Allow moderators to view story levels on website Show comments to moderators on in-game story levels that show the levels id * Only show LH ID comment on the first page
This commit is contained in:
parent
6e92ddc89f
commit
14ebad07f3
5 changed files with 66 additions and 2 deletions
|
@ -29,7 +29,7 @@ public class SlotPage : BaseLayout
|
|||
public async Task<IActionResult> OnGet([FromRoute] int id)
|
||||
{
|
||||
SlotEntity? slot = await this.Database.Slots.Include(s => s.Creator)
|
||||
.Where(s => s.Type == SlotType.User)
|
||||
.Where(s => s.Type == SlotType.User || (this.User != null && this.User.PermissionLevel >= PermissionLevel.Moderator))
|
||||
.FirstOrDefaultAsync(s => s.SlotId == id);
|
||||
if (slot == null) return this.NotFound();
|
||||
System.Diagnostics.Debug.Assert(slot.Creator != null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue