Fix photos with me and admin granted slots

This commit is contained in:
Slendy 2022-09-02 21:52:41 -05:00
parent d916a11ae7
commit fddef506c8
No known key found for this signature in database
GPG key ID: 7288D68361B91428
4 changed files with 30 additions and 24 deletions

View file

@ -68,7 +68,7 @@ public class PublishController : ControllerBase
return this.BadRequest();
}
}
else if (user.GetUsedSlotsForGame(gameToken.GameVersion) > ServerConfiguration.Instance.UserGeneratedContentLimits.EntitledSlots)
else if (user.GetUsedSlotsForGame(gameToken.GameVersion) > user.EntitledSlots)
{
return this.StatusCode(403, "");
}
@ -205,7 +205,7 @@ public class PublishController : ControllerBase
return this.Ok(oldSlot.Serialize(gameToken.GameVersion));
}
if (user.GetUsedSlotsForGame(slotVersion) > ServerConfiguration.Instance.UserGeneratedContentLimits.EntitledSlots)
if (user.GetUsedSlotsForGame(slotVersion) > user.EntitledSlots)
{
Logger.Warn("Rejecting level upload, too many published slots", LogArea.Publish);
return this.BadRequest();