mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-04 15:19:43 +00:00
Merge branch 'main' into recent-activity
# Conflicts: # .config/dotnet-tools.json # ProjectLighthouse.Servers.Website/Pages/Partials/ReviewPartial.cshtml
This commit is contained in:
commit
8f91875f7c
54 changed files with 459 additions and 48 deletions
|
@ -43,6 +43,9 @@ public class PublishController : ControllerBase
|
|||
UserEntity? user = await this.database.UserFromGameToken(token);
|
||||
if (user == null) return this.Forbid();
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
GameUserSlot? slot = await this.DeserializeBody<GameUserSlot>();
|
||||
if (slot == null)
|
||||
{
|
||||
|
@ -116,6 +119,9 @@ public class PublishController : ControllerBase
|
|||
UserEntity? user = await this.database.UserFromGameToken(token);
|
||||
if (user == null) return this.Forbid();
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
GameUserSlot? slot = await this.DeserializeBody<GameUserSlot>();
|
||||
|
||||
if (slot == null)
|
||||
|
@ -335,6 +341,9 @@ public class PublishController : ControllerBase
|
|||
{
|
||||
GameTokenEntity token = this.GetToken();
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
SlotEntity? slot = await this.database.Slots.FirstOrDefaultAsync(s => s.SlotId == id);
|
||||
if (slot == null) return this.NotFound();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue