mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Allow viewing room visualizer on release if user is admin
This commit is contained in:
parent
ddd3863708
commit
303fb878ea
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
#nullable enable
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using LBPUnion.ProjectLighthouse.Pages.Layouts;
|
||||
|
@ -13,7 +14,10 @@ public class RoomVisualizerPage : BaseLayout
|
|||
public async Task<IActionResult> OnGet()
|
||||
{
|
||||
#if !DEBUG
|
||||
return this.NotFound();
|
||||
User? user = this.Database.UserFromWebRequest(this.Request);
|
||||
if (user == null || !user.IsAdmin) return this.NotFound();
|
||||
|
||||
return this.Page();
|
||||
#else
|
||||
return this.Page();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue